This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-09
Channels
- # announcements (10)
- # babashka (5)
- # beginners (46)
- # biff (5)
- # clerk (12)
- # cljdoc (10)
- # clojure-belgium (2)
- # clojure-europe (5)
- # clojure-norway (15)
- # clojure-spec (2)
- # clojure-uk (5)
- # cursive (2)
- # data-science (13)
- # duct (7)
- # etaoin (7)
- # hyperfiddle (2)
- # malli (12)
- # nbb (2)
- # off-topic (9)
- # releases (2)
- # ring (13)
- # tools-deps (17)
I need to be able to trigger a build/rebuild of a SNAPSHOT
release, in my CI script (by calling a function in build.clj). It's documented https://github.com/cljdoc/cljdoc/blob/master/doc/docsets.md#trigger-a-build-for-a-project but is there some Clojure code somewhere that already does this that I can steal?
Hi Joakim! Not snapshot specific, but here's https://github.com/clj-commons/pomegranate/blob/559202f08d91dffa0c6483633c5b73e3659f3ec2/script/ci_publish.clj#L60-L67. I did a https://grep.app/ and found this more more https://github.com/lambdaisland/open-source/blob/2dc2a8ef9978a3fc45e8f524b0e46253caa40fe2/src/lioss/release.clj#L50-L54.
Thanks, will check later when I’m back home. I guess curl is always installed, so this will therefore work, otherwise we need to use some libraries.
Oh wait, I see your point, my example spawned to curl... right. Don't have to do that anymore, can use https://github.com/babashka/http-client.
Okay, cool.
So, taking an arbitrary project I found that has a SNAPSHOT build... something like this:
(require '[babashka.http-client :as http])
(let [{:keys [status]} (http/post ""
{:throw false
:form-params {"project" "clj-pail/clj-pail"
"version" "0.1.6-SNAPSHOT"}})]
(println "Status of build request" status))
Thanks!!