This repository has been archived by the owner on Oct 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bb.edn
112 lines (68 loc) · 3.69 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
{:paths ["project/core/src/main"
"project/depstar/src/main"
"project/kaocha/src/main"]
:tasks {cp
{:doc "Pretty prints the class path received as STDIN"
:requires ([helins.maestro.cp :as $.cp])
:task ($.cp/print-stdin)}
cp:rm
{:doc "Deletes the computed classpath"
:requires ([helins.maestro.cp :as $.cp])
:task ($.cp/rm)}
deploy
{:doc "Deploy this project to Clojars ; needs username and path leading to Clojars token"
:task (clojure {:extra-env {"CLOJARS_USERNAME" (first *command-line-args*)
"CLOJARS_PASSWORD" (slurp (second *command-line-args*))}}
(let [dir (.substring (nth *command-line-args*
2)
1)]
(format "-X:task/deploy :artifact '%s' :pom-file '%s'"
(pr-str (format "build/jar/%s.jar"
dir))
(pr-str (format "%s/pom.xml"
dir)))))}
dev
{:doc "Starts dev mode (using '-M' by default) ; same arguments as Clojure CLI"
:requires ([helins.maestro.run :as $.run])
:task ($.run/dev)}
install
{:doc "Install alias to local Maven repo"
:task (clojure (let [dir (.substring (first *command-line-args*)
1)]
(format "-X:task/install :artifact '%s' :pom-file '%s'"
(pr-str (format "build/jar/%s.jar"
dir))
(pr-str (format "%s/pom.xml"
dir)))))}
jar
{:doc "Packages the given aliases in a jar ; same arguments as Depstar"
:requires ([helins.maestro.depstar.run :as $.depstar.run])
:task ($.depstar.run/jar)}
lint
{:doc "Starts Clj-kondo on the path given as argument ; understands globs"
:task (shell (str "clj-kondo --lint "
(first *command-line-args*)))}
lint:import
{:doc "Initializes Clj-kondo and copies configuration files from dependencies ; uses classpath received as STDIN"
:task (shell (format "clj-kondo --lint '%s' --dependencies --parallel --copy-configs"
(slurp *in*)))}
run-M
{:doc "Executes Clojure using '-M', calling the main class specified in the alias"
:requires ([helins.maestro.run :as $.run])
:task ($.run/main-class)}
run-X
{:doc "Executes Clojure using '-X', using the function specified in the alias"
:requires ([helins.maestro.run :as $.run])
:task ($.run/function)}
test
{:doc "Runs tests on the JVM for the given aliases ; accepts Kaocha CLI arguments"
:requires ([helins.maestro.kaocha.run :as $.kaocha.run])
:task ($.kaocha.run/broad)}
test:narrow
{:doc "Like `test` but tests only the given aliases, not transitive ones"
:requires ([helins.maestro.kaocha.run :as $.kaocha.run])
:task ($.kaocha.run/narrow)}
uberjar
{:doc "Packages the given aliases in an uberjar ; same arguments as Depstar"
:requires ([helins.maestro.depstar.run :as $.depstar.run])
:task ($.depstar.run/uberjar)}}}