Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject org.clojars.cvillecsteele/lein-git-version "1.2.7"
(defproject org.clojars.cvillecsteele/lein-git-version "1.2.8"
:description "Use git for project versions"
:url "https://github.com/cvillecsteele/lein-git-version"
:license {:name "Eclipse Public License"
Expand Down
7 changes: 4 additions & 3 deletions src/leiningen/git_version.clj
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
:root-ns nil
:assoc-in-keys [[:version]]
:filename "version.clj"
:tag-to-version #(apply str (rest %))})
:tag-to-version `#(apply str (rest %))})

(defn get-git-version
[{:keys [version-cmd tag-to-version] :as config}]
(let [cmd (clojure.string/split version-cmd #" ")]
(tag-to-version (clojure.string/trim (:out (apply sh cmd))))))
(let [cmd (clojure.string/split version-cmd #" ")
out (clojure.string/trim (:out (apply sh cmd)))]
(eval `(~tag-to-version ~out))))

(defn get-git-ref
[{:keys [ref-cmd] :as config}]
Expand Down