-
Notifications
You must be signed in to change notification settings - Fork 18
/
bb.edn
23 lines (23 loc) · 920 Bytes
/
bb.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{:deps {org.clj-commons/infra {:git/url "https://github.com/clj-commons/infra"
:git/sha "a3ebcff4d32c4b84f001f86cdee5c76358d15ea5"}}
:tasks
{:requires ([clojure.string :as str]
[deployment.release :as r])
deploy
{:task
(if (r/all-good?)
(do
(let [v (r/version!)
;; commit count + 1 for README update
cc (inc (Integer/parseInt (r/commit-count!)))
rt (r/release-tag (r/commit-count-version v cc))]
(spit "README.md"
(str/replace (slurp "README.md")
(re-pattern (format "(%s)\\.(\\d+)" v))
(fn [[_ version _]]
(str version "." cc))))
(shell "git add README.md")
(shell "git commit -m 'Bump version in README'")
(shell "git push"))
(r/release!))
(println "Unclean!"))}}}