I have this clojure code in my tools/build.clj file:
(ns build
(:require [clojure.tools.build.api :as build]))
;; Get the number of commits reachable since the last tagged commit.
(def version
(let [last-tag (build/git-process {:git-args "describe --tags --abbrev=0"})]
(format "%s.%s"
last-tag
(build/git-process {:git-args
["rev-list"
(format "%s..HEAD"
last-tag)
"--count"]}))))
This sets the version
string to null.null
when run on Windows, but not when run on Linux. Thought you'd want to know.