babashka/test-resources/bb.edn
Michiel Borkent ab3b4fa53a dude
2021-03-27 16:47:38 +01:00

41 lines
1.7 KiB
Clojure

{:paths ["test-resources/bb-edn"] ;; no-brainer to support this
:deps {medley/medley {:mvn/version "1.3.0"}} ;; no-brainer to support this
;; here comes the part that is currently uncertain
:tasks {:count-files [shell "bash" "-c" "ls | wc -l"]
:bash [babashka user/bash]
:eval-plus [babashka -e (apply + (map (fn [i]
(Integer/parseInt i))
*command-line-args*))]
:describe [babashka clojure -Sdescribe]
:do-bash [do
[:bash "ls | wc -l"]
[:eval-plus 1 2 3]]
:all [do
[:count-files]
[:bash "ls | wc -l"]
[:eval-plus 1 2 3]
[:describe]]
;;;;
:never-failing-shell
[babashka -e (-> (do (deref (babashka.process/process ["ls" "foobar"] {:inherit true}))
(deref (babashka.process/process ["echo" "done"] {:inherit true}))
nil))]
:print-hello [babashka -e (println :hello)]
:always-failing-shell [babashka -e (babashka.process/check (babashka.process/process ["ls" "foobar"] {:inherit true}))]
:composed-never-failing [do
[:never-failing-shell]
[:print-hello]]
:composed-failing [do
[:always-failing-shell]
[:print-hello]]
,
;;;; help
:cool-task {:doc "Usage: bb :cool-task
Sum up the numbers 1, 2 and 3."
:task [babashka "-e" "(+ 1 2 3)"]}
,
}
}