Skip to content

Commit

Permalink
changed fallback for version read
Browse files Browse the repository at this point in the history
  • Loading branch information
invaliduser committed Jul 26, 2024
1 parent 093c2e1 commit 6af4036
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/lrsql/init/git_data.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@
(defn read-version []
(try (edn/read-string (slurp "lrsql/config/git-details.edn"))
(catch Exception _
(try (clojure.string/trim (str "DEV-" (:out (sh "git" "describe" "--tags"))))
(try
(let [hash (:out (sh "git" "rev-parse" "HEAD"))]
(->> hash
(take 7)
(apply str)
(str "DEV-")
clojure.string/trim))
(catch Exception _ "DEV")))))

0 comments on commit 6af4036

Please sign in to comment.