Skip to content

Instantly share code, notes, and snippets.

Last active Sep 21, 2016
What would you like to do?
Clojurescript & boot app release version and sentry integration
'[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})
(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})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment