-
Notifications
You must be signed in to change notification settings - Fork 0
/
bb.edn
42 lines (32 loc) · 1.16 KB
/
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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{:paths ["bb"]
:tasks
{:requires ([clojure.string :as str]
[tasks])
jar {:doc "Build jar"
:task (clojure "-T:build jar")}
install {:doc "Install jar in local maven repo"
:task (clojure "-T:build install")}
test {:doc "Runs tests"
:task (clojure "-X:test")}
bump-version (do (tasks/bump-version)
(shell "git add resources")
(shell "git commit -m 'Bump version'"))
tag (shell (str "git tag v" (tasks/version)))
publish {:task (do
(run 'bump-version)
(run 'tag)
(shell "git push --atomic origin main"
(str "v" (tasks/version))))}
current-branch (->> (shell {:out :string} "git rev-parse --abbrev-ref HEAD")
:out
str/trim)
can-release {:depends [current-branch]
:task (= "main" current-branch)}
deploy {:doc "Deploys to clojars"
:depends [can-release]
:task (when can-release
(clojure
{:continue true}
"-J-Dclojure.main.report=stderr -T:build deploy"))}
,}
,}