Last active
September 21, 2016 16:38
-
-
Save minimal/f64f7fd375ea0335ac15b8d6893ff817 to your computer and use it in GitHub Desktop.
Clojurescript & boot app release version and sentry integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import | |
'[java.time ZonedDateTime] | |
'[java.time.format DateTimeFormatter]) | |
;; add a RELEASE closure define with the current iso date, RAVEN_DSN from env var | |
(deftask production [] | |
(task-options! cljs {:optimizations :advanced | |
:compiler-options {:closure-defines {"goog.DEBUG" false | |
"myapp.core.RAVEN_DSN" (System/getenv "RAVEN_DSN") | |
"myapp.core.RELEASE" (.. (ZonedDateTime/now) | |
(format DateTimeFormatter/ISO_INSTANT))}} | |
:source-map true}) | |
identity) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns myapp.core) | |
(def RELEASE "@define {string}" "") | |
(def RAVEN_DSN "@define {string}" "") | |
(when-not ^boolean js/goog.DEBUG | |
(-> (js/Raven.config ^string myapp.core/RAVEN_DSN | |
#js {:release ^string myapp.core/RELEASE}) | |
.install)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment