-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.boot
executable file
·46 lines (39 loc) · 1.41 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
#!/usr/bin/env boot
(def project 'notube)
(def version "0.1.2")
(set-env!
:source-paths #{"src"}
:resource-paths #{"resources"}
:dependencies '[[org.clojure/clojure "1.8.0"]
[javax.servlet/servlet-api "2.5"] ;; needed for compojure/server routes
[http-kit "2.2.0"] ;; for client and web server
[compojure "1.5.2"] ;; simple route to populate tokens from google login
[org.clojure/core.async "0.2.395"]
[org.clojure/tools.cli "0.3.5"]
[org.clojure/data.json "0.2.6"]])
(task-options!
aot {:all true}
jar {:main 'thehex.notube.cli
:file (str "notube-" version ".jar")})
(deftask uberjar
"Build the project locally as a production JAR.
For dev, just run ./build.boot -h, etc"
[d dir PATH #{str} "the set of directories to write to (target)."]
(System/setProperty "prod" "true")
(let [dir (if (seq dir) dir #{"target"})]
(comp (aot) (uber) (jar) (target :dir dir))))
(deftask devbuild
[]
;; override end and task options
(set-env!
:source-paths #{"src"})
(task-options!
aot {:namespaces #{'thehex.notube.cli}})
(uberjar))
;; (require '[adzerk.boot-test :refer [test]])
(defn -main
"This will run when executing this file directly i.e. ./build.boot
dev version. Accepts command line args"
[& args]
(require 'thehex.notube.cli)
(apply (resolve 'thehex.notube.cli/-main) args))