Welcome! Please see the About page for a little more info on how this works.

0 votes
in Clojure CLI by

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"
            (build/git-process {:git-args
                                 (format "%s..HEAD"

This sets the version string to null.null when run on Windows, but not when run on Linux. Thought you'd want to know.

1 Answer

0 votes

You probably need to set the :git-command attribute when building on Windows to whatever your git command is.