forked from francesco-bracchi/boot-marginalia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.boot
71 lines (55 loc) · 1.72 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
(def +project+ 'it.frbracch/boot-marginalia)
(def +version+ "0.1.1")
(def +description+ "boot plugin for marginalia")
(def +source-paths+ #{"src/clj"})
(def +dependencies+ '[[boot/core "2.0.0-rc13" :scope "provided"]
[org.clojure/clojure "1.6.0" :scope "provided"]
[marginalia "0.8.0"]])
(def +url+ "https://github.com/francesco-bracchi/boot-marginalia")
(def +license+ {"EPL" "http://www.eclipse.org/legal/epl-v10.html"})
(set-env!
:source-paths +source-paths+
:dependencies +dependencies+)
(task-options!
pom {:project +project+
:version +version+
:description +description+
:url +url+
:scm {:url +url+}
:license +license+}
sift {:to-resource #{#".*clj$"}}
push {:repo "deploy-clojars"
:gpg-sign true})
(defn get-username []
(print "username: ")
(read-line))
(defn get-password []
(print "password: ")
(apply str (-> (System/console) .readPassword)))
(deftask clojars-credentials
[]
(fn [next]
(fn [fileset]
(boot.util/info "Clojar credentials\n")
(merge-env! :repositories
[["deploy-clojars" {:url "https://clojars.org/repo"
:username (get-username)
:password (get-password)}]])
(println (get-env))
(next fileset))))
(deftask pack
"pack file in a jarfile"
[]
(comp (pom) (jar)))
(deftask build
"build and pack the jarfile"
[]
(comp (sift) (pack)))
(deftask deploy-clojars
"deploy to clojars"
[]
(comp (clojars-credentials) (push)))
(deftask release []
(comp (build) (deploy-clojars)))
(deftask local []
(comp (build) (install)))