-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.boot
50 lines (40 loc) · 1.71 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
(set-env!
:dependencies '[[org.clojure/clojure "1.7.0" :scope "provided"]
[adzerk/bootlaces "0.1.13" :scope "test"]]
:resource-paths #{"src" "resources"})
(require
'[boot.util :as util]
'[adzerk.bootlaces :refer :all :exclude [build-jar] :as laces]
'[clojure.java.io :as io])
(def +version+ "0.6.0")
(bootlaces! +version+)
(task-options!
pom {:project 'boot-immutant
:version +version+
:description "Boot plugin for managing an Immutant project."
:url "https://github.com/immutant/boot-immutant"
:scm {:url "https://github.com/immutant/boot-immutant"}
:license {"Eclipse Public License - v 1.0"
"http://www.eclipse.org/legal/epl-v10.html"}})
(def in-pod-dependencies
[['boot-immutant +version+]
['org.immutant/deploy-tools "2.1.1"]
['org.immutant/fntest "2.0.10"]])
(deftask in-pod-repl []
(require 'boot.pod)
(let [pod-name "-worker-pod"]
(doto (boot.pod/make-pod
(assoc boot.pod/env :dependencies (conj in-pod-dependencies
['boot/aether *boot-version*])))
(.setName pod-name))
(repl :pod pod-name)))
(deftask write-pod-dependencies []
(with-pre-wrap fileset
(let [tgt (temp-dir!)]
(util/info "Writing in-pod-dependencies.edn...\n")
(spit (io/file tgt "in-pod-dependencies.edn")
(pr-str in-pod-dependencies))
(-> fileset (add-resource tgt) commit!))))
(deftask build-jar [] (comp (write-pod-dependencies) (laces/build-jar)))
(deftask release [] (comp (write-pod-dependencies) (pom) (jar) (push-release)))
(deftask snapshot [] (comp (write-pod-dependencies) (pom) (jar) (push-snapshot)))