This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-20
Channels
- # announcements (1)
- # asami (6)
- # babashka (21)
- # beginners (19)
- # calva (44)
- # circleci (3)
- # clj-http (3)
- # clj-kondo (44)
- # clojure (24)
- # clojure-australia (1)
- # clojure-czech (1)
- # clojure-europe (50)
- # clojure-france (5)
- # clojure-germany (1)
- # clojure-nl (2)
- # clojure-spec (8)
- # clojure-uk (8)
- # clojurescript (161)
- # datomic (4)
- # fulcro (7)
- # graalvm (8)
- # heroku (4)
- # lambdaisland (4)
- # lein-figwheel (5)
- # lsp (48)
- # malli (21)
- # meander (15)
- # off-topic (35)
- # polylith (2)
- # re-frame (21)
- # react (22)
- # reagent (13)
- # reitit (6)
- # remote-jobs (1)
- # reveal (3)
- # ring (3)
- # shadow-cljs (37)
- # testing (2)
- # tools-deps (10)
- # vim (18)
- # vrac (1)
- # xtdb (17)
how to prevent exit for (shell...)
if exit code is not 0 ? I would like to continue bb script execution.
@mike1452 Not possible yet with that one but you can use babashka.process or clojure.java.shell as an alternative
got it. thanks.
Found another good use for fs/modified-since
:
https://gist.github.com/borkdude/35bc0a20bd4c112dec2c5645f67250e3#file-1-bb-edn-L2-L5
We rebuild our deps.edn from a template when any relevant files on which it depends changes, when invoking any task.
currently in babashka tasks, is there a way to invoke one task from another? (other than using :depends
, I like to have more control over the execution order)
I can understand if there is a design decision to not allow that ,just wanna make sure I’m just not missing the syntax 🙂
@U066U8JQJ currently the options are: create functions either in :init
or in a script and use functional programming... or use (do (shell "bb clean") ...)
to invoke a task from within bb.
I do want to support this better but I haven't found a satisfying syntax yet
I think the options you pointed out are good, not sure if needs any change 👍
because more stuff means extended semantics, maybe its a good thing to keep the task semantics simple (only call on depends)
one any snippet I’m using with babashka tasks:
-$TASK$
{:depends [$DEPS$]}
$TASK$
(shell "bb run --parallel -$TASK$")
(this is using IntelliJ format, but easy to port over to other snippet systems)I have this is ptask
to quickly get it in
I have a bb.edn
like this: {:tasks {hello {:requires [[babashka.fs :as fs]] :task (println "hello")}}}
that works fine. But if I refactor it like this: {:requires [[babashka.fs :as fs]] :tasks {hello {:task (println "hello")}}}`` it tries to download an updated
clojure-tools.jar
(and fails due to work’s egress firewall :face_with_rolling_eyes: )
Is there a reason :requires
works differently at the top-level than it does within a task?
Finally made a bb script/lib to update a github release with artifacts from multiple steps and even from two different CIs: https://github.com/borkdude/gh-release-artifact