-
Notifications
You must be signed in to change notification settings - Fork 26
/
bb.edn
79 lines (77 loc) · 3.43 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
{:paths ["script" "build"]
:deps {lread/status-line {:git/url "https://github.com/lread/status-line.git"
:sha "cf44c15f30ea3867227fa61ceb823e5e942c707f"}
io.github.babashka/neil {:git/tag "v0.3.68" :git/sha "78ffab1"}
version-clj/version-clj {:mvn/version "2.0.3"}}
:tasks {;; setup
:requires ([babashka.fs :as fs]
[clojure.string :as string]
[lread.status-line :as status])
:enter (let [{:keys [name]} (current-task)] (status/line :head "TASK %s %s" name (string/join " " *command-line-args*)))
:leave (let [{:keys [name]} (current-task)] (status/line :detail "\nTASK %s done." name))
;; tasks
clean
{:doc "clean build work"
:task (do
(println "Deleting (d=deleted -=did not exist)")
(run! (fn [d]
(println (format "[%s] %s"
(if (fs/exists? d) "d" "-")
d))
(fs/delete-tree d))
["target" ".cpcache"]))}
download-deps
{:doc "bring down Clojure deps"
:task download-deps/-main}
compile-java
{:doc "compile java sources"
:task (clojure "-T:build compile-java")}
test
{:doc "Runs tests under Clojure [--clj-version] (recognizes cognitect test-runner args)"
:requires ([test-clj])
:task (do
(when (not (fs/exists? "target/classes"))
(run 'compile-java))
(apply test-clj/-main *command-line-args*))}
test-native
{:doc "Run tests natively compiled (requires GraalVM)"
:task test-native/-main}
lint-kondo
{:doc "[--rebuild] Lint source code with clj-kondo"
:task lint/-main}
lint-eastwood
{:doc "Lint source code with Eastwood"
:depends [compile-java]
:task (clojure "-M:test:eastwood")}
lint
{:doc "Run all lints"
:depends [lint-kondo lint-eastwood]}
outdated
{:doc "report on outdated dependencies"
:task (clojure {:continue true} "-M:outdated")}
nvd-scan
{:doc "Check for security vulnerabilities in dependencies"
:task (let [cp (with-out-str (clojure "-Spath"))]
(clojure {:dir "./nvd_check_helper_project"}
"-J-Dclojure.main.report=stderr -M -m nvd.task.check"
"./config.json"
cp))}
pubcheck
{:doc "run only publish checks (without publishing)"
:task publish/pubcheck}
publish
{:doc "Publish a release (for maintainers)"
:task publish/-main}
neil ;; let's not rely on a random version of neil
{:doc "Pinned version of babashka/neil (used in scripting)"
:task babashka.neil/-main}
;; hidden tasks, no need for folks to be trying these ci invoked tasks
-ci-clojars-deploy
{:doc "triggered on ci by release tag"
:task ci-publish/clojars-deploy}
-ci-github-create-release
{:doc "triggered on ci by release tag"
:task ci-publish/github-create-release}
-ci-cljdoc-request-build
{:doc "ask cljdoc to build docs for new release"
:task ci-publish/cljdoc-request-build}}}