-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbb.edn
31 lines (24 loc) · 1.57 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
{:deps {}
:tasks {:requires ([babashka.fs :as fs])
;; helpers and constants
:init (println "init")
:enter (do)
:leave (do)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; commands
repl {:doc "Run Clojure repl for Emacs with cider"
:task (clojure "-M:nrepl")}
outdated {:doc "Check for outdated dependencies"
:task (clojure (str "-M:outdated " (apply str (interpose " " *command-line-args*))))}
bump {:doc "Bump version artifact in `project-version` file, level may be one of: major, minor, patch, alpha, beta, rc, release."
:task (let [param (first *command-line-args*)
level (or (#{"major" "minor" "patch" "alpha" "beta" "rc" "release"} param) "patch")]
(shell {:out version-file} (format "bb -f scripts/bump-semver.clj %s %s" version-id level))
(println version-id "->" (clojure.string/trim (slurp version-file))))}
test {:doc "Run tests"
:task (clojure (str "-M:test " (apply str (interpose " " *command-line-args*))))}
format {:doc "Format source code"
:task (do (shell "cljstyle fix"))}
lint {:doc "Lint source code"
:task (do (shell "clj-kondo --parallel --lint src:test:dev/src")
(shell "cljstyle check"))}}}