-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.boot
57 lines (47 loc) · 1.6 KB
/
build.boot
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
45
46
47
48
49
50
51
52
53
54
55
56
(set-env!
:exclusions '[org.clojure/clojure]
:dependencies '[[seancorfield/boot-tools-deps "0.4.5" :scope "test"]
[onetom/boot-lein-generate "0.1.3" :scope "test"]
[adzerk/boot-test "1.2.0" :scope "test"]])
(require '[clojure.edn :as edn]
'[clojure.java.io :as io]
'[boot-tools-deps.core :refer [deps load-deps]]
'[boot.lein :as boot-lein]
'[adzerk.boot-test :as boot-test])
(def default-repos
[["maven-central" {:url "https://repo1.maven.org/maven2"}]
["clojars" {:url "https://clojars.org/repo/"
:username (get-sys-env "CLOJARS_USER" :required)
:password (get-sys-env "CLOJARS_PASS" :required)}]])
(def repos
(reduce-kv #(conj %1 [%2 %3]) default-repos
(:mvn/repos (edn/read-string (slurp (io/file "deps.edn"))))))
(set-env!
:repositories repos)
(task-options! pom
(edn/read-string
(slurp (io/file "project.edn"))))
(deftask lein
[]
(load-deps
{:overwrite-boot-deps true
:repeatable true})
(boot-lein/generate)
identity)
(ns-unmap *ns* 'test)
(deftask test
[]
(comp (deps
:overwrite-boot-deps true
:repeatable true
:aliases [:test])
(boot-test/test
:include #"-test$")))
(deftask deploy
[]
(comp (deps
:overwrite-boot-deps true
:repeatable true)
(pom)
(jar)
(push :repo "clojars")))