-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.clj
33 lines (27 loc) · 906 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
(ns build
(:require
[clojure.tools.build.api :as b]
[clojure.string :as str]
[org.corfield.build :as bb])
(:import [java.time LocalDate]))
(def lib 'space.matterandvoid/subscriptions)
(def version (str/replace (str (LocalDate/now)) "-" "."))
;; run these to deploy a new version of the app
;; clojure -T:build jar
;; CLOJARS_USERNAME=... clojure -T:build deploy
;; git tag -a v<version>
;; git push github --tags
(defn clean [opts] (bb/clean opts))
(defn jar [opts]
(-> opts
(bb/clean)
(assoc :lib lib :version version :src-dirs ["src/main" "src/clj-kondo"] :src-pom "template/pom.xml")
(bb/jar)))
(defn install [opts]
(-> opts
(assoc :lib lib :version version :src-dirs ["src/main" "src/clj-kondo"] :src-pom "template/pom.xml")
(bb/install)))
(defn deploy "Deploy the JAR to Clojars." [opts]
(-> opts
(assoc :lib lib :version version)
(bb/deploy)))