-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.clj
43 lines (36 loc) · 1019 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
33
34
35
36
37
38
39
40
41
42
43
(ns build
(:require [clojure.tools.build.api :as b]
[org.corfield.build :as bb]
[clojure.string :as str])
(:refer-clojure :exclude [test]))
(def lib 'grafter/matcha.alpha)
(def version (str/replace (or (System/getenv "CIRCLE_TAG")
"v0.3.999-SNAPSHOT")
#"^v" ""))
(def jar-file (format "target/%s-%s.jar" (name lib) version))
(defn test
"Run the tests"
[opts]
(bb/run-tests opts))
(defn build
"Run the CI pipeline of tests (and build the JAR)."
[opts]
(-> opts
(assoc :lib lib
:version version
:src-pom "template/pom.xml")
(bb/clean)
(bb/jar)))
(defn install
"Install the JAR locally."
[opts]
(-> opts
(assoc :lib lib :version version)
(bb/install)))
(defn deploy
"Deploy the JAR to Clojars.
NOTE: this expects a tag to be set; typically done via the github release UI."
[opts]
(-> opts
(assoc :lib lib :version version)
(bb/deploy)))