tools-build

Alex Miller (Clojure team) 2021-08-23T01:36:20.017100Z

io.github.clojure/tools.build {:git/tag "v0.1.9" :git/sha "6736c83"} is now available • git-count-revs - add :path option • pom-path - new task that computes the path to the pom.xml in a jar

👍🏻 1
seancorfield 2021-08-23T01:43:25.017300Z

FWIW, pom-path doesn't actually solve the problem the OP raised on http://ask.clojure.org -- they had pointed out that my projects all had the pom path hardcoded but that's in deps.edn as an argument to deps-deploy -- and that has to use -X invocation because the pom file can't be overridden in the -M style invocation, so build.clj cannot easily compute the pom file path and then invoke deps-deploy because it doesn't have an easy way to invoke exec fns in a subprocess.

seancorfield 2021-08-23T01:46:28.017500Z

I see for the f-form project they reference that the :build alias also includes deps-deploy which I guess is a way around that https://github.com/mainej/f-form/blob/main/deps.edn#L12

Alex Miller (Clojure team) 2021-08-23T01:51:58.017800Z

that makes sense to me

👍🏻 1
seancorfield 2021-08-23T01:58:36.018Z

Hmm, that pulls in pomegranate and s3-wagon-private 😞 https://github.com/slipset/deps-deploy/blob/master/deps.edn#L2-L7

seancorfield 2021-08-23T02:32:00.018400Z

Updated four of my projects to tools.build 0.1.9; moved deploy into build.clj per the above:

(defn deploy "Deploy the JAR to Clojars." [opts]
  (dd/deploy (merge {:installer :remote :artifact jar-file
                     :pom-file (b/pom-path {:lib lib :class-dir class-dir})}
                    opts)))
(so you can run clojure -T:build deploy :installer :local to test that it does the right thing 🙂 )