Skip to content

Commit

Permalink
tell the commit
Browse files Browse the repository at this point in the history
  • Loading branch information
caumond committed Oct 6, 2023
1 parent a392d05 commit c0d6e6a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
28 changes: 16 additions & 12 deletions bb.edn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
:in :inherit
:err :inherit
:shutdown p/destroy-tree})
(defn- cicd?
[]
(System/getenv "CI"))
(defn run-processes
"Run processes with logs features
Params:
Expand All @@ -30,10 +33,12 @@
p/check))
(catch Exception e
(println (str "Error during execution of `" (:name (current-task)) "`"))
(let [file (fs/create-temp-file)]
(println "See details in `" (.toString (.toAbsolutePath file)) "`")
(spit (fs/file file) (prn-str e))
"")
(if (cicd?)
(prn-str e)
(let [file (fs/create-temp-file)]
(println "See details in `" (.toString (.toAbsolutePath file)) "`")
(spit (fs/file file) (prn-str e))
""))
(System/exit 1)))))
:requires [[babashka.process :as p]
[babashka.fs :as fs]]
Expand All @@ -43,14 +48,13 @@
["npx" "shadow-cljs" "compile" "ltest"]
["npx" "karma" "start" "--single-run"])}
lint {:doc "Lint (option -d will print details of file linted)"
:task (run-processes (apply concat
["clj-kondo"
"--lint"
"env/development/src"
"src"
"test"]
(when (= "-d" (first *command-line-args*))
"--debug")))}
:task (run-processes (concat ["clj-kondo"
"--lint"
"env/development/src"
"src"
"test"]
(when (= "-d" (first *command-line-args*))
["--debug"])))}
gha {:doc "Github action command - is launched automatically by github"
:task (run-processes ["bb" "lint"]
["bb" "ltest"])}
Expand Down
2 changes: 1 addition & 1 deletion test/clj/automaton_core/adapters/build_config_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
";; Hey!")
(is (= content
(edn-utils/read-edn-or-nil (files/create-file-path tmp-dir
sut/build-config-filename)))))))
sut/build-config-filename)))))))

0 comments on commit c0d6e6a

Please sign in to comment.