-(defproject day8.re-frame/forward-events-fx "0.0.7-SNAPSHOT"
+(defproject day8.re-frame/forward-events-fx "see :git-version below https://github.com/arrdem/lein-git-version"
   :description "A re-frame effects handler for listening-for and then post-processing dispatched events."
   :url "https://github.com/day8/re-frame-forward-events-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

                                    :username      :env/CLOJARS_USERNAME
                                    :password      :env/CLOJARS_PASSWORD}]]

  :release-tasks [["vcs" "assert-committed"]
                  ["change" "version" "leiningen.release/bump-version" "release"]
                  ["vcs" "commit"]
                  ["vcs" "tag" "v" "--no-sign"]
                  ["deploy" "clojars"]
                  ["change" "version" "leiningen.release/bump-version"]
                  ["vcs" "commit"]
                  ["vcs" "push"]]

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

                 [thheller/shadow-cljs "2.8.69" :scope "provided"]
                 [re-frame "0.10.9" :scope "provided"]]

  :plugins [[me.arrdem/lein-git-version "2.0.3"]
            [lein-shadow "0.1.6"]]

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