Skip to content

Commit

Permalink
Use the sha, not the tag for the scm tag
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranshila committed Aug 28, 2021
1 parent 82b9c09 commit fa027e3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion build/build.clj
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
(ns build
(:require [clojure.tools.build.api :as b]
[org.corfield.build :as bb]))
[org.corfield.build :as bb]
[clojure.string :as str]))

(def lib 'com.kiranshila/cybermonday)
(def version (format "0.2.%s" (b/git-count-revs nil)))

(defn sha
[{:keys [dir path] :or {dir "."} :as params}]
(-> {:command-args (cond-> ["git" "rev-parse" "HEAD"]
path (conj "--" path))
:dir (.getPath (b/resolve-path dir))
:out :capture}
b/process
:out
str/trim))

(defn thinjar
"Create thinjar"
[opts]
(-> opts
(assoc :lib lib
:version version
:tag (sha nil)
:scm-url "https://github.com/kiranshila/cybermonday")
(bb/clean)
(bb/jar)))
Expand Down

0 comments on commit fa027e3

Please sign in to comment.