-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.clj
44 lines (39 loc) · 1.14 KB
/
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
44
(ns build
(:require [clojure.tools.build.api :as b]
[org.corfield.build :as cb]))
(defn project
"apply project default to `opts`"
[opts]
(let [defaults {:lib 'io.github.robertluo/fun-map
:version (format "0.5.%s" (b/git-count-revs nil))
:scm {:url "https://github.com/robertluo/fun-map"}
:pom-data [[:licenses
[:license
[:name "Eclipse Public License 1.0"]
[:url "https://opensource.org/license/epl-1-0/"]]]]}]
(merge defaults opts)))
(defn tests
[opts]
(-> opts
(cb/run-task [:dev :test])
(cb/run-task [:dev :cljs-test])))
(defn copy-clj-kondo-config
"copy clj-kondo definition to local dev env"
[opts]
(let [{:keys [lib] :as opts} (project opts)
config-dir (str "resources/clj-kondo.exports/" lib)]
(b/copy-dir {:src-dirs [config-dir]
:target-dir ".clj-kondo"})
opts))
(defn ci
[opts]
(-> opts
(project)
(cb/clean)
(tests)
(cb/jar)))
(defn deploy
[opts]
(-> opts
(project)
(cb/deploy)))