PR review feedback: change run-doc-tests arg to :aliases
Example usages are now: ``` clojure -T:build run-doc-tests clojure -T:build run-doc-tests :aliases '[:cljs]' clojure -T:build run-doc-tests :aliases '[:1.9]' clojure -T:build run-doc-tests :aliases '[:1.10]' clojure -T:build run-doc-tests :aliases '[:master]' ```
This commit is contained in:
parent
ae29147a22
commit
1c042c375b
1 changed files with 16 additions and 12 deletions
28
build.clj
28
build.clj
|
|
@ -4,6 +4,8 @@
|
||||||
clojure -T:build run-tests
|
clojure -T:build run-tests
|
||||||
clojure -T:build run-tests :aliases '[:master]'
|
clojure -T:build run-tests :aliases '[:master]'
|
||||||
|
|
||||||
|
clojure -T:build run-doc-tests :aliases '[:cljs]'
|
||||||
|
|
||||||
clojure -T:build ci
|
clojure -T:build ci
|
||||||
|
|
||||||
For more information, run:
|
For more information, run:
|
||||||
|
|
@ -25,26 +27,28 @@
|
||||||
(defn run-doc-tests
|
(defn run-doc-tests
|
||||||
"Generate and run doc tests.
|
"Generate and run doc tests.
|
||||||
|
|
||||||
Optionally specify :plaftorm:
|
Optionally specify :aliases vector:
|
||||||
:1.9 -- test against Clojure 1.9 (the default)
|
[:1.9] -- test against Clojure 1.9 (the default)
|
||||||
:1.10 -- test against Clojure 1.10.3
|
[:1.10] -- test against Clojure 1.10.3
|
||||||
:master -- test against Clojure 1.11 master snapshot
|
[:master] -- test against Clojure 1.11 master snapshot
|
||||||
:cljs -- test against ClojureScript"
|
[:cljs] -- test against ClojureScript"
|
||||||
[{:keys [platform] :or {platform :1.9} :as opts}]
|
[{:keys [aliases] :as opts}]
|
||||||
(gen-doc-tests opts)
|
(gen-doc-tests opts)
|
||||||
(bb/run-tests (assoc opts :aliases
|
(bb/run-tests (assoc opts :aliases
|
||||||
(conj [:test-doc platform]
|
(-> [:test-doc]
|
||||||
(if (= :cljs platform)
|
(into aliases)
|
||||||
:test-doc-cljs
|
(into (if (some #{:cljs} aliases)
|
||||||
:test-doc-clj)))))
|
[:test-doc-cljs]
|
||||||
|
[:test-doc-clj])))))
|
||||||
|
opts)
|
||||||
|
|
||||||
(defn ci "Run the CI pipeline of tests (and build the JAR)." [opts]
|
(defn ci "Run the CI pipeline of tests (and build the JAR)." [opts]
|
||||||
(-> opts
|
(-> opts
|
||||||
(bb/clean)
|
(bb/clean)
|
||||||
(assoc :lib lib :version version)
|
(assoc :lib lib :version version)
|
||||||
(as-> opts
|
(as-> opts
|
||||||
(reduce (fn [opts platform]
|
(reduce (fn [opts alias]
|
||||||
(run-doc-tests (assoc opts :platform platform)))
|
(run-doc-tests (assoc opts :aliases [alias])))
|
||||||
opts
|
opts
|
||||||
[:cljs :1.9 :1.10 :master]))
|
[:cljs :1.9 :1.10 :master]))
|
||||||
(eastwood)
|
(eastwood)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue