babashka/test-resources/bb.edn

42 lines
1.7 KiB
Clojure
Raw Normal View History

2021-03-19 11:14:04 +00:00
{: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
2021-03-27 15:47:38 +00:00
: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]]
2021-03-18 10:31:41 +00:00
;;;;
2021-03-18 10:35:01 +00:00
:never-failing-shell
2021-03-27 15:47:38 +00:00
[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]]
2021-03-19 10:53:15 +00:00
,
2021-03-20 15:44:44 +00:00
;;;; help
2021-03-27 15:47:38 +00:00
:cool-task {:doc "Usage: bb :cool-task
2021-03-20 15:44:44 +00:00
2021-03-27 15:47:38 +00:00
Sum up the numbers 1, 2 and 3."
:task [babashka "-e" "(+ 1 2 3)"]}
2021-03-20 15:44:44 +00:00
,
2021-03-19 10:53:15 +00:00
}
2021-03-18 10:31:41 +00:00
}