-(defproject day8.re-frame/async-flow-fx "0.1.1-SNAPSHOT"
+(defproject day8.re-frame/async-flow-fx "see :git-version below https://github.com/arrdem/lein-git-version"
   :description "A re-frame effects handler for coordinating the kind of async control flow which often happens on app startup."
   :url "https://github.com/day8/re-frame-async-flow-fx.git"
   :license {:name "MIT"}
+
+  :git-version
+  {:status-to-version
+   (fn [{:keys [tag version branch ahead ahead? dirty?] :as git}]
+     (assert (re-find #"\d+\.\d+\.\d+" tag)
+       "Tag is assumed to be a raw SemVer version")
+     (if (and tag (not ahead?) (not dirty?))
+       tag
+       (let [[_ prefix patch] (re-find #"(\d+\.\d+)\.(\d+)" tag)
+             patch            (Long/parseLong patch)
+             patch+           (inc patch)]
+         (format "%s.%d-%s-SNAPSHOT" prefix patch+ ahead))))}
+
   :dependencies [[org.clojure/clojure "1.10.1" :scope "provided"]
                  [org.clojure/clojurescript "1.10.520" :scope "provided"
                   :exclusions [com.google.javascript/closure-compiler-unshaded

                 [re-frame "0.10.9" :scope "provided"]
                 [day8.re-frame/forward-events-fx "0.0.6"]]

  :plugins [[lein-shadow "0.1.5"]]

  :profiles {:debug {:debug true}
             :dev   {:dependencies [[karma-reporter "3.1.0"]

                             :macosx  "open"
                             :linux   "xdg-open"}}}

  :deploy-repositories [["clojars" {:sign-releases false
                                    :url           "https://clojars.org/repo"
                                    :username      :env/CLOJARS_USERNAME
                                    :password      :env/CLOJARS_PASSWORD}]]

  :release-tasks [["deploy" "clojars"]]

  :aliases {"dev-auto"   ["do"
                          ["clean"]
