forked from alda-lang/alda-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.boot
executable file
·77 lines (64 loc) · 2.74 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
72
73
74
75
76
(set-env!
:source-paths #{"src" "test"}
:resource-paths #{"examples"}
:dependencies '[
; dev
[adzerk/bootlaces "0.1.13" :scope "test"]
[adzerk/boot-test "1.2.0" :scope "test"]
[org.clojure/tools.namespace "0.3.0-alpha3" :scope "test"]
[alda/server-clj "LATEST" :scope "test"]
[alda/sound-engine-clj "LATEST" :scope "test"]
; used in examples_test.clj
[io.aviso/pretty "0.1.34" :scope "test"]
; alda.core
[org.clojure/clojure "1.10.0"]
[org.clojure/core.async "0.3.443"]
[com.taoensso/timbre "4.10.0"]
[djy "0.1.4"]
[potemkin "0.4.4"]
[clj_manifest "0.2.0"]])
(require '[adzerk.bootlaces :refer :all]
'[adzerk.boot-test :refer :all])
(def ^:const +version+ "0.5.4")
(bootlaces! +version+)
(task-options!
pom {:project 'alda/core
:version +version+
:description "The core machinery of Alda"
:url "https://github.com/alda-lang/alda-core"
:scm {:url "https://github.com/alda-lang/alda-core"}
:license {"name" "Eclipse Public License"
"url" "http://www.eclipse.org/legal/epl-v10.html"}}
jar {:file "alda-core.jar"}
install {:pom "alda/core"}
target {:dir #{"target"}}
test {:include #"-test$"})
;; This task is a work in progress.
;;
;; Each time the -main function is called, it starts a server and workers, and
;; they just run forever until you Ctrl-C, killing the entire `boot dev`
;; process.
;;
;; I'd like to make it so that each time there is a change to the fileset, the
;; server and workers stop gracefully, the namespace is reloaded (:reload below
;; doesn't seem to do the trick... I'm probably missing something), and the
;; server and workers are started again with the latest code.
(deftask dev
"Runs an Alda server using the latest alda/server-clj and the local copy of
the code in this repo for alda/core."
[p port PORT int "The port on which to run the server. (default: 27714)"
w workers WORKERS int "The number of workers to start. (default: 2)"]
(comp
(watch)
(with-pass-thru _
(require 'alda.dev :reload)
((resolve 'alda.dev/-main) (or port 27714) (or workers 2)))))
(deftask package
"Builds jar file."
[]
(comp (pom)
(jar)))
(deftask deploy
"Builds jar file, installs it to local Maven repo, and deploys it to Clojars."
[]
(comp (package) (install) (push-release)))