2021-03-17 11:25:26 +00:00
|
|
|
{:paths ["test-resources/bb-edn"]
|
|
|
|
|
:tasks {:count-files {:task/type :shell
|
|
|
|
|
:args ["bash" "-c" "ls | wc -l"]}
|
2021-03-17 15:59:33 +00:00
|
|
|
:bash {:task/type :babashka
|
|
|
|
|
:args [:invoke user/bash]}
|
2021-03-17 12:05:04 +00:00
|
|
|
:eval-plus {:task/type :babashka
|
2021-03-17 11:25:26 +00:00
|
|
|
:args [-e (apply + (map (fn [i]
|
|
|
|
|
(Integer/parseInt i))
|
|
|
|
|
*command-line-args*))]}
|
2021-03-17 15:36:25 +00:00
|
|
|
:describe {:task/type :babashka
|
|
|
|
|
:args [:clojure -Sdescribe]}
|
2021-03-17 13:40:21 +00:00
|
|
|
:do-bash {:task/type :babashka
|
|
|
|
|
:args [:do :bash "ls | wc -l"
|
|
|
|
|
:__ :eval-plus 1 2 3]}
|
2021-03-17 11:25:26 +00:00
|
|
|
:all {:task/type :babashka
|
2021-03-17 12:05:04 +00:00
|
|
|
:args [:do :count-files
|
|
|
|
|
:__ :bash "ls | wc -l"
|
|
|
|
|
:__ :eval-plus 1 2 3
|
2021-03-18 10:31:41 +00:00
|
|
|
:__ :describe]}
|
|
|
|
|
;;;;
|
2021-03-18 10:35:01 +00:00
|
|
|
:never-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))]}
|
2021-03-18 10:31:41 +00:00
|
|
|
:print-hello {:task/type :babashka
|
|
|
|
|
:args [-e (println :hello)]}
|
2021-03-18 10:35:01 +00:00
|
|
|
|
|
|
|
|
:always-failing-shell
|
|
|
|
|
{:task/type :babashka
|
|
|
|
|
;; we are executing a shell task, yet we are continueing despite the error code
|
|
|
|
|
:args [-e (babashka.process/check (babashka.process/process ["ls" "foobar"] {:inherit true}))]}
|
|
|
|
|
:composed-never-failing {:task/type :babashka
|
|
|
|
|
:args [:do :never-failing-shell
|
|
|
|
|
:__ :print-hello]}
|
2021-03-18 10:31:41 +00:00
|
|
|
:composed-failing {:task/type :babashka
|
2021-03-18 10:35:01 +00:00
|
|
|
:args [:do :always-failing-shell
|
2021-03-18 10:31:41 +00:00
|
|
|
:__ :print-hello]}
|
2021-03-19 10:53:15 +00:00
|
|
|
,
|
|
|
|
|
|
|
|
|
|
;;;; context (not implemented)
|
|
|
|
|
:put-answer-in-ctx {:type/task :babashka
|
|
|
|
|
:args [:eval-plus 1 2 3]
|
|
|
|
|
:out [:answer]}
|
|
|
|
|
:print-answer {:type/task :babashka
|
|
|
|
|
:in {:sum [:answer]}
|
|
|
|
|
:args [-e (println $sum)]}
|
|
|
|
|
}
|
2021-03-18 10:31:41 +00:00
|
|
|
}
|