From 83b4e6720c7d2586bd1e790a4aad84144fe6ac55 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Tue, 15 Sep 2026 16:21:29 +0200 Subject: [PATCH 1/2] Publish to Clojars with bb --- .build/tasks.clj | 4 ++-- bb.edn | 3 +-- deps.edn | 7 ------- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.build/tasks.clj b/.build/tasks.clj index 50c8810..d46f3a0 100644 --- a/.build/tasks.clj +++ b/.build/tasks.clj @@ -1,5 +1,5 @@ (ns tasks - (:require [babashka.tasks :refer [clojure run shell]])) + (:require [babashka.tasks :refer [run shell]])) (defn publish "Publish to clojars and npm, then push." @@ -8,7 +8,7 @@ [{:keys [bump]}] (when bump (run 'bump-release)) - (clojure "-T:build deploy") + (run 'deploy) (run 'npm-publish) ;; bump-release pushes the tag, the commit it points at needs this (shell "git push")) diff --git a/bb.edn b/bb.edn index de03155..8fc1199 100644 --- a/bb.edn +++ b/bb.edn @@ -73,7 +73,6 @@ deploy {:doc "Build the jar and deploy it to Clojars, all in bb" :extra-paths ["."] - :extra-deps {io.github.clojure/tools.build {:mvn/version "0.10.14"} - io.github.babashka/deps-deploy {:mvn/version "0.0.1"}} + :extra-deps {io.github.babashka/deps-deploy {:mvn/version "0.0.1"}} :requires ([build]) :task (build/deploy {})}}} diff --git a/deps.edn b/deps.edn index 05f4ba9..f104beb 100644 --- a/deps.edn +++ b/deps.edn @@ -13,13 +13,6 @@ :main-opts ["-m" "babashka.cli.exec"] :exec-fn babashka.test-runner/test #_cognitect.test-runner.api/test} - :build ;; added by neil - {:deps {io.github.clojure/tools.build {:mvn/version "0.10.14"} - io.github.babashka/deps-deploy {:mvn/version "0.0.1"}} - :extra-paths ["." ".build"] - :ns-default build - :main-opts ["-m" "babashka.cli.exec"]} - :clj-1.10 {:extra-deps {org.clojure/clojure {:mvn/version "1.10.3"}}} :clj-1.11 {:extra-deps {org.clojure/clojure {:mvn/version "1.11.4"}}} :clj-1.12 {:extra-deps {org.clojure/clojure {:mvn/version "1.12.5"}}} From e87d64d2af79dd64b846f854598126e7e42871ac Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Tue, 15 Sep 2026 16:22:31 +0200 Subject: [PATCH 2/2] Merge the deploy task into publish --- .build/tasks.clj | 3 ++- bb.edn | 10 +++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.build/tasks.clj b/.build/tasks.clj index d46f3a0..24f7ccb 100644 --- a/.build/tasks.clj +++ b/.build/tasks.clj @@ -8,7 +8,8 @@ [{:keys [bump]}] (when bump (run 'bump-release)) - (run 'deploy) + ;; loaded after bump-release, so build reads the new version + ((requiring-resolve 'build/deploy) {}) (run 'npm-publish) ;; bump-release pushes the tag, the commit it points at needs this (shell "git push")) diff --git a/bb.edn b/bb.edn index 8fc1199..b26bd8e 100644 --- a/bb.edn +++ b/bb.edn @@ -69,10 +69,6 @@ (shell "npm publish"))} publish {:doc "Publish to clojars and npm, then push" - :exec-fn tasks/publish} - - deploy {:doc "Build the jar and deploy it to Clojars, all in bb" - :extra-paths ["."] - :extra-deps {io.github.babashka/deps-deploy {:mvn/version "0.0.1"}} - :requires ([build]) - :task (build/deploy {})}}} + :extra-paths ["."] + :extra-deps {io.github.babashka/deps-deploy {:mvn/version "0.0.1"}} + :exec-fn tasks/publish}}}