   messages for describe to work properly:
   `git tag 0.0.2 -m 'Move forward'`"
   []
-  (let [[version commits hash dirty?]
-        (next (re-matches #"(.*?)-(.*?)-(.*?)(-dirty)?\n"
+  (let [[version previous-hash commits hash dirty?]
+        (next (re-matches #"(\d+\.\d+\.\d+)(-\w*)?-(\d*)-(.*?)(-dirty)?\n"
                           (:out (sh/sh "git"
                                        "describe"
                                        "--always"

      default-version)))

(def project 'com.frereth/cp)
#_(def version #_"0.0.3" (deduce-version-from-git))

;; TODO: Add a dependency on weald and refactor away the local copy
;; of shared.logging.
(set-env! :resource-paths #{"src/clojure"}
          :dependencies '[[adzerk/bootlaces "0.1.13" :scope "test"]
                          [adzerk/boot-test "RELEASE" :scope "test"]


(def default-version
  "Really just for running inside docker w/out git tags"
  "0.0.4-???-dirty")

(defn deduce-version-from-git
  "Avoid another decade of pointless, unnecessary and error-prone
  fiddling with version labels in source code.
