babashka/test-resources/bb.edn
Michiel Borkent c5ebffa7bf wip [skip ci]
2021-03-18 11:31:41 +01:00

32 lines
1.6 KiB
Clojure

{:paths ["test-resources/bb-edn"]
:tasks {:count-files {:task/type :shell
:args ["bash" "-c" "ls | wc -l"]}
:bash {:task/type :babashka
:args [:invoke user/bash]}
:eval-plus {:task/type :babashka
:args [-e (apply + (map (fn [i]
(Integer/parseInt i))
*command-line-args*))]}
:describe {:task/type :babashka
:args [:clojure -Sdescribe]}
:do-bash {:task/type :babashka
:args [:do :bash "ls | wc -l"
:__ :eval-plus 1 2 3]}
:all {:task/type :babashka
:args [:do :count-files
:__ :bash "ls | wc -l"
:__ :eval-plus 1 2 3
:__ :describe]}
;;;;
:failing-shell {:task/type :babashka
;; we are executing a shell task, yet we are continueing despite the error code
:args [-e (-> (do (deref (babashka.process/process ["ls" "foobar"] {:inherit true}))
(deref (babashka.process/process ["echo" "done"] {:inherit true}))
nil))]}
:print-hello {:task/type :babashka
:args [-e (println :hello)]}
:composed-failing {:task/type :babashka
:args [:do :failing-shell
:__ :print-hello]}
,}
}