-
-
Notifications
You must be signed in to change notification settings - Fork 48
/
bb.edn
60 lines (49 loc) · 2.55 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
{;; Parts of this script have been copied from: https://github.com/clj-commons/etaoin/blob/master/bb.edn
:min-bb-version "1.3.182"
:paths ["." "scripts"]
:deps {borkdude/rewrite-edn {:mvn/version "0.4.7"}
lread/status-line {:git/url "https://github.com/lread/status-line.git"
:sha "cf44c15f30ea3867227fa61ceb823e5e942c707f"}
version-clj/version-clj {:mvn/version "2.0.2"}}
:tasks
{;; setup
:requires ([clojure.string :as string]
[lread.status-line :as status]
[babashka.process :refer [shell]])
:enter (let [{:keys [name]} (current-task)]
(when-not (string/starts-with? name "-")
(status/line :head "TASK %s %s" name (string/join " " *command-line-args*))))
:leave (let [{:keys [name]} (current-task)]
(when-not (string/starts-with? name "-")
(status/line :detail "\nTASK %s done." name)))
;; commands
clean {:doc "Delete build work and artifacts"
:task clean/-main}
doc-preview {:doc "Preview what docs will look like on cljdoc, use help for args"
:task cljdoc-preview/-main}
poly-uberjar {:doc "Builds poly uberjar, if needed (run clean first to force)"
:requires [poly-jar]
:task (poly-jar/build "poly")}
polyx-uberjar {:doc "Builds polyx uberjar, if needed (run clean first to force)"
:requires [poly-jar]
:task (poly-jar/build "polyx")}
poly-local {:doc "Installs the poly tool locally"
:depends [poly-uberjar]
:task (shell "sudo cp projects/poly/target/poly.jar /usr/local/polylith/poly.jar")}
help-txt {:doc "Generates doc text files via poly help command"
:depends [poly-uberjar]
:requires [help]
:task (help/help)}
help-doc {:doc "Assembles doc text into doc/commands.adoc"
:requires [help]
:task (help/update-command-doc)}
update-commands-doc {:doc "Run help-txt then help-doc"
:depends [help-txt help-doc]}
;; How to execute a stand-alone command (available commands are listed at the end of create_example/-main):
;; bb create-example test-runners
create-example {:doc "Creates and exercises examples workspaces (also generates some doc images and doc code blocks)"
:depends [poly-uberjar polyx-uberjar]
:requires [create-example]
:task create-example/-main}
gen-all {:doc "Run update-commands-docs then create-example"
:depends [update-commands-doc create-example]}}}