forked from Convex-Dev/convex.cljc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbb.edn
233 lines (158 loc) · 8.34 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
{:deps
{local/task {:local/root "module/task"}}
:pods
{clj-kondo/clj-kondo {:version "2022.09.08"}}
;;;;;;;;;;
:tasks
{aliases
{:doc "Resolves and prints all required aliases"
:protosens/doc "Given an alias or a vector of aliases and profiles, prints all necessary
aliases, following `:maestro/require` in `deps.edn`.
bb aliases :module/cvm
bb aliases '[:module/cvm :module/net]'
A `:maestro/mode` can also be activated (see `deps.edn`):
bb aliases :dev '[:module/cvm :module/net]'
Provide any additional aliases you might need for your dev workflow.
For instance, an alias for NREPL located in your `~/.clojure/deps.edn`."
:requires ([protosens.maestro])
:task (protosens.maestro/main)}
api
{:doc "Generate documentation for modules"
:protosens/doc "Produce an `API.md` file at the root of relevant modules.
It will contain a full description of all namespaces belonging to the module,
with vars and usage."
:requires ([protosens.maestro.plugin.quickdoc])
:task (protosens.maestro.plugin.quickdoc/module+)}
build
{:doc "Build the given module"
:requires ([protosens.maestro.plugin.build])
:task (protosens.maestro.plugin.build/main :ext/protosens.maestro.idiom)}
changelog+
{:doc "Template all changelogs with a stable tag"
:protosens/doc "Takes that tag as argument.
Changelogs use `{{ next-release }}` as a placeholder for the next
stable tag."
:requires ([convex.task.changelog])
:task (convex.task.changelog/main)}
dev
{:doc "Shortcut for starting dev mode"
:protosens/doc "Same kind of arguments as the `aliases` task but activates the `:dev` mode."
:requires ([protosens.maestro.process])
:task (protosens.maestro.process/run {:maestro/mode :dev
:maestro.process/command ["clj" "-M__"]})}
expose
{:doc "Expose modules as Git libraries"
:protosens/doc "By generating a custom `deps.edn` file for those having a `:maestro.module.expose/name`
in their alias data."
:requires ([protosens.maestro.module.expose])
:task (protosens.maestro.module.expose/deploy)}
expose:local
{:doc "Like `expose` but Git URL will point to the repository directory"
:protosens/doc "Only for testing.
Allows testing exposition and running tasks like `expose:verify` without having
to push commits."
:requires ([protosens.maestro.module.expose])
:task (protosens.maestro.module.expose/deploy-local)}
expose:req
{:doc "Generate requirer namespaces for exposed modules"
:protosens/doc "Each relevant module has an autogenerated namespace that requires all its
production namespaces.
It must be run prior to the `expose:verify` task and refreshed when those modules
are changed."
:requires ([protosens.maestro.module.expose])
:task (protosens.maestro.module.expose/requirer+)}
expose:verify
{:doc "Verify exposed modules"
:protosens/doc "By executing their requirer namespaces on their `:maestro/platform+`.
Ensures that they can be consumed in production (e.g. no missing dependency).
See the `req:gen` task."
:requires ([protosens.maestro.module.expose])
:task (protosens.maestro.module.expose/verify)}
genesis
{:doc "Run before using any of these tasks"
:protosens/doc "Syncs dependencies and paths between `bb.edn` and `deps.edn`.
It is important running this after cloning the repository and
after modifying dependencies or source paths needed by these
Babashka tasks."
:requires ([protosens.maestro.module.uber])
:task (protosens.maestro.module.uber/generate :module/task)}
help
{:doc "Print documentation for the given task"
:protosens/doc "If there is any."
:requires ([protosens.bb.help])
:task (-> (protosens.bb.help/task)
(protosens.bb.help/print))}
help:missing
{:doc "Print tasks that do no have extra documentation"
:requires ([protosens.bb.help])
:task (-> (protosens.bb.help/undocumented-task+)
(protosens.bb.help/print))}
lint
{:doc "Lint the whole repository"
:protosens/doc "Using Clj-kondo.
See the `lint:prepare` task."
:requires ([protosens.maestro.plugin.clj-kondo])
:task (protosens.maestro.plugin.clj-kondo/lint)}
lint:prepare
{:doc "Prepare for `lint`"
:protosens/doc "Must be run prior to the first time `lint` is run and on dependency changes."
:requires ([protosens.maestro.plugin.clj-kondo])
:task (protosens.maestro.plugin.clj-kondo/prepare)}
module:listing
{:doc "Generate `./module/README.md`"
:protosens/doc "Lists all exposed and private modules."
:requires ([convex.task.listing])
:task (convex.task.listing/main)}
module:readme
{:doc "Generate READMEs for all modules"
:protosens/doc "For each module, writes a header composed of the root and relevant information (link to
API, Git dependency info, etc).
If `./doc/README.md` exists relative to the root, its content is appended."
:requires ([protosens.maestro.idiom.readme])
:task (protosens.maestro.idiom.readme/main)}
mtempl
{:doc "Execute a shell command with computed required aliases"
:protosens/doc "Substituting `__` for required aliases (see the `aliases` task).
E.g. bb mtempl :test :module/cvm -- clojure -M__"
:requires ([protosens.maestro.process])
:task (protosens.maestro.process/run)}
native:agent
{:doc "Use `java` with native-image-agent tracing"
:protosens/doc "Provide the same argument you would provide to `java`
Analyze runtime behavior and output results to `./private/agent`
Will contain things like reflection configuration for the `native:image` task."
:requires ([convex.task.native])
:task (convex.task.native/agent)}
native:reflect-config
{:doc "Copies reflection configuration"
:protosens/doc "See the `native:agent` task.
Will copy to the directory given as argument after doing some preparation on the configuration file."
:requires ([convex.task.native])
:task (task.native/reflect-config)}
native:image
{:doc "Build a native image for the given module"
:protosens/doc "Assumes its uberjar has been built using the `build` task.
Uberjar describes the output path in its native image properties."
:requires ([convex.task.native])
:task (convex.task.native/image)}
pprint-cp
{:doc "Pretty prints the classpath read from STDIN"
:protosens/doc "Useful for things like:
clojure -Spath -A$( bb aliases :module/cvm ) | bb pprint-cp"
:requires ([protosens.classpath])
:task (protosens.classpath/pprint)}
stable:tag
{:doc "Tag the last commit as a stable release"
:requires ([protosens.maestro.idiom.stable])
:task (println (protosens.maestro.idiom.stable/tag-add))}
test
{:doc "Launch tests for the given alias(es)"
:requires ([protosens.maestro.process])
:task (protosens.maestro.process/run {:maestro/mode :test
:maestro.process/command ["clojure" "-M__"]})}
test-upstream
{:doc "Like the `test` but also tests transitively required aliases"
:requires ([protosens.maestro.process])
:task (protosens.maestro.process/run {:maestro/mode :test-upstream
:maestro.process/command ["clojure" "-M__"]})}
}}