-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.clj
32 lines (26 loc) · 820 Bytes
/
build.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(ns build
(:require [clojure.tools.build.api :as b]
[org.corfield.build :as bb]))
(def lib 'net.clojars.cyrik/cljs-macroexpand)
;; if you want a version of MAJOR.MINOR.COMMITS:
(def version (format "0.1.%s" (b/git-count-revs nil)))
(defn test "Run the tests." [opts]
(bb/run-tests opts))
(defn clean "clean" [opts]
(-> opts
(assoc :lib lib :version version)
(bb/clean)))
(defn install "Install the JAR locally." [opts]
(-> opts
(assoc :lib lib :version version)
(bb/install)))
(defn ci "Run the CI pipeline of tests (and build the JAR)." [opts]
(-> opts
(assoc :lib lib :version version)
(bb/run-tests)
(bb/clean)
(bb/jar)))
(defn deploy "Deploy the JAR to Clojars." [opts]
(-> opts
(assoc :lib lib :version version)
(bb/deploy)))