Skip to content

Instantly share code, notes, and snippets.

@olieidel
Created January 30, 2018 13:03
Show Gist options
  • Save olieidel/27d05f646f42bf14a614bbd837f8410b to your computer and use it in GitHub Desktop.
Save olieidel/27d05f646f42bf14a614bbd837f8410b to your computer and use it in GitHub Desktop.
ClojureScript: read out leiningen project version
(ns your-project.constants
#?(:cljs (:require-macros [your-project.constants :refer [get-app-version]])))
#?(:clj
(do
(def app-version
(System/getProperty "your-project.version"))
(defmacro get-app-version []
app-version))
:cljs
(def ^:const app-version (get-app-version)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment