-
Notifications
You must be signed in to change notification settings - Fork 9
/
bb.edn
44 lines (44 loc) · 2.5 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
{:min-bb-version "0.9.162"
:paths ["src" "test" "test-resources" "dev"]
:pods {org.babashka/fswatcher {:version "0.0.3"}}
:deps {org.babashka/spec.alpha {:git/url "https://github.com/babashka/spec.alpha"
:git/sha "951b49b8c173244e66443b8188e3ff928a0a71e7"}
local/deps {:local/root "."}}
:bbin/bin {bbin {:main-opts ["-f" "bbin"]}}
:tasks {bbin {:requires ([babashka.bbin.cli :as bbin])
:task (apply bbin/-main *command-line-args*)}
dev {:doc "Starts watcher to auto-build bbin script"
:requires ([babashka.bbin.dev :as dev])
:task (dev/dev)}
ci {:doc "Run all CI tasks locally"
:requires ([taoensso.timbre :as log])
:task (do
(log/info "bb run lint")
(run 'lint)
(log/info "bb run test")
(run 'test))}
lint (shell "clj-kondo --lint .")
test {:depends [gen-script]
:extra-deps {io.github.cognitect-labs/test-runner
{:git/tag "v0.5.1" :git/sha "dfb30dd"}
ring/ring-core {:mvn/version "1.12.1"}}
:task cognitect.test-runner/-main}
gen-script {:doc "Build the bbin script"
:extra-deps {org.clojure/tools.namespace
{:mvn/version "1.5.0"}}
:requires ([babashka.bbin.gen-script :as gen-script])
:task (gen-script/gen-script)}
render-templates {:requires ([clojure.string :as str]
[clojure.edn :as edn]
[selmer.parser :as p]
[selmer.util :refer [without-escaping]])
:task (let [version (some-> (slurp "deps.edn") edn/read-string
:aliases :neil :project :version)]
(without-escaping
(->> (p/render (slurp "templates/docs/installation.template.md")
{:version version})
(spit "docs/installation.md")))
(without-escaping
(->> (p/render (slurp "templates/README.template.md")
{:version version})
(spit "README.md"))))}}}