From 584cd1c7116f2685fbe3e9a9a5117e0031feac8f Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Sun, 22 Aug 2021 19:30:04 -0700 Subject: [PATCH] update tools.build; add deploy via build --- build.clj | 8 +++++++- deps.edn | 15 +++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/build.clj b/build.clj index 0568cf2..afb009e 100644 --- a/build.clj +++ b/build.clj @@ -10,7 +10,8 @@ clojure -A:deps -T:build help/doc" (:require [clojure.tools.build.api :as b] - [clojure.tools.deps.alpha :as t])) + [clojure.tools.deps.alpha :as t] + [deps-deploy.deps-deploy :as dd])) (def lib 'com.github.seancorfield/honeysql) (def version (format "2.0.%s" (b/git-count-revs nil))) @@ -79,3 +80,8 @@ [:cljs :1.9 :1.10 :master])) (clean) (jar))) + +(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))) diff --git a/deps.edn b/deps.edn index 949a88b..965e1f6 100644 --- a/deps.edn +++ b/deps.edn @@ -3,7 +3,8 @@ :deps {org.clojure/clojure {:mvn/version "1.9.0"}} :aliases {;; for help: clojure -A:deps -T:build help/doc - :build {:deps {io.github.clojure/tools.build {:git/tag "v0.1.8" :git/sha "38d2780"}} + :build {:deps {io.github.clojure/tools.build {:git/tag "v0.1.9" :git/sha "6736c83"} + io.github.slipset/deps-deploy {:sha "b4359c5d67ca002d9ed0c4b41b710d7e5a82e3bf"}} :ns-default build} ;; versions to test against: @@ -17,6 +18,8 @@ :extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.4.0" :git/sha "334f2e2"}} :exec-fn cognitect.test-runner.api/test} + + ;; various "runners" for tests/CI: :runner {:main-opts ["-m" "cognitect.test-runner"]} :cljs {:extra-deps {olical/cljs-test-runner {:mvn/version "3.8.0"}} @@ -24,12 +27,4 @@ :readme {:extra-deps {seancorfield/readme {:mvn/version "1.0.16"}} :main-opts ["-m" "seancorfield.readme"]} :eastwood {:extra-deps {jonase/eastwood {:mvn/version "0.5.1"}} - :main-opts ["-m" "eastwood.lint" "{:source-paths,[\"src\"]}"]} - - ;; first run: clojure -T:build ci - ;; then: clojure -T:deploy target/h - :deploy {:deps {slipset/deps-deploy {:git/url "https://github.com/slipset/deps-deploy" - :sha "b4359c5d67ca002d9ed0c4b41b710d7e5a82e3bf"}} - :exec-fn deps-deploy.deps-deploy/deploy - :exec-args {:installer :remote - :pom-file "target/classes/META-INF/maven/com.github.seancorfield/honeysql/pom.xml"}}}} + :main-opts ["-m" "eastwood.lint" "{:source-paths,[\"src\"]}"]}}}