2021-08-01 23:21:31 +00:00
|
|
|
(ns build
|
2021-08-13 02:43:04 +00:00
|
|
|
"next.jdbc's build script.
|
|
|
|
|
|
|
|
|
|
clojure -T:build ci
|
2021-08-31 01:23:18 +00:00
|
|
|
clojure -T:build deploy
|
|
|
|
|
|
|
|
|
|
Run tests via:
|
|
|
|
|
clojure -X:test
|
2021-08-13 02:43:04 +00:00
|
|
|
|
|
|
|
|
For more information, run:
|
|
|
|
|
|
|
|
|
|
clojure -A:deps -T:build help/doc"
|
2021-08-03 03:41:43 +00:00
|
|
|
(:require [clojure.tools.build.api :as b]
|
2021-08-28 05:51:55 +00:00
|
|
|
[org.corfield.build :as bb]))
|
2021-08-01 23:21:31 +00:00
|
|
|
|
2021-08-03 03:23:24 +00:00
|
|
|
(def lib 'com.github.seancorfield/next.jdbc)
|
|
|
|
|
(def version (format "1.2.%s" (b/git-count-revs nil)))
|
|
|
|
|
|
2021-08-13 02:43:04 +00:00
|
|
|
(defn ci "Run the CI pipeline of tests (and build the JAR)." [opts]
|
2021-08-23 02:51:40 +00:00
|
|
|
(-> opts
|
2021-08-28 05:51:55 +00:00
|
|
|
(assoc :lib lib :version version)
|
2021-08-23 02:51:40 +00:00
|
|
|
(as-> opts
|
|
|
|
|
(reduce (fn [opts alias]
|
2021-08-28 05:51:55 +00:00
|
|
|
(bb/run-tests (assoc opts :aliases [alias])))
|
2021-08-23 02:51:40 +00:00
|
|
|
opts
|
|
|
|
|
[:1.10 :master]))
|
2021-08-28 05:51:55 +00:00
|
|
|
(bb/clean)
|
|
|
|
|
(bb/jar)))
|
2021-08-23 02:30:15 +00:00
|
|
|
|
|
|
|
|
(defn deploy "Deploy the JAR to Clojars." [opts]
|
2021-08-28 05:51:55 +00:00
|
|
|
(-> opts
|
|
|
|
|
(assoc :lib lib :version version)
|
|
|
|
|
(bb/deploy)))
|