-
Notifications
You must be signed in to change notification settings - Fork 0
/
bb.edn
33 lines (26 loc) · 1.3 KB
/
bb.edn
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
{:tasks
{:requires ([clojure.java.shell :refer [sh]]
[clojure.string :as str])
:init (do
(defn str-quote [s] (str/join s ["'" "'"]))
(defn str-space [& xs] (str/join " " xs))
(def *pwd* (-> "pwd" sh :out str/trim-newline))
(def *image* "neilyio/rpl-interpreter")
(def *docker-build* (str-space "docker build --tag" *image*))
(def *docker-run* (str-space
"docker run"
"--rm"
"--interactive"
"--tty"
"--publish 7888:7888" ; match Dockerfile
"--volume"
(str *pwd* ":/root/rpl-interpreter")
)))
build (shell (str-space *docker-build* "."))
build-dbg (shell (str-space *docker-build*
"--progress" "plain"
"--no-cache"
"."))
start (shell (str-space *docker-run* *image*))
nrepl (shell (str-space *docker-run* *image* "-M:nrepl"))
shell (shell (str-space *docker-run* "--entrypoint /bin/bash" *image*))}}