honeysql/build.clj

41 lines
1 KiB
Clojure
Raw Normal View History

2021-08-13 02:20:02 +00:00
(ns build
"HoneySQL's build script.
clojure -T:build run-tests
clojure -T:build run-tests :aliases '[:master]'
clojure -T:build ci
For more information, run:
clojure -A:deps -T:build help/doc"
(:require [clojure.tools.build.api :as b]
2021-08-28 05:51:49 +00:00
[org.corfield.build :as bb]))
2021-08-13 02:20:02 +00:00
(def lib 'com.github.seancorfield/honeysql)
(def version (format "2.0.%s" (b/git-count-revs nil)))
2021-08-28 05:51:49 +00:00
(defn readme "Run the README tests." [opts]
(-> opts (bb/run-task [:readme])))
2021-08-13 02:20:02 +00:00
2021-08-28 05:51:49 +00:00
(defn eastwood "Run Eastwood." [opts]
(-> opts (bb/run-task [:eastwood])))
2021-08-13 02:20:02 +00:00
(defn ci "Run the CI pipeline of tests (and build the JAR)." [opts]
(-> opts
2021-08-28 05:51:49 +00:00
(assoc :lib lib :version version)
2021-08-13 02:20:02 +00:00
(readme)
(eastwood)
(as-> opts
(reduce (fn [opts alias]
2021-08-28 05:51:49 +00:00
(bb/run-tests (assoc opts :aliases [alias])))
2021-08-13 02:20:02 +00:00
opts
2021-08-13 02:21:35 +00:00
[:cljs :1.9 :1.10 :master]))
2021-08-28 05:51:49 +00:00
(bb/clean)
(bb/jar)))
(defn deploy "Deploy the JAR to Clojars." [opts]
2021-08-28 05:51:49 +00:00
(-> opts
(assoc :lib lib :version version)
(bb/deploy)))