-
Notifications
You must be signed in to change notification settings - Fork 0
/
bb.edn
31 lines (31 loc) · 1.5 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
{:paths ["src"]
:tasks {clean {:doc "Cleans the project artifacts"
:extra-paths ["scripts"]
:requires ([tasks :as t])
:task (t/clean)}
pack {:doc "Packages the code for AWS lambda deployment"
:extra-paths ["scripts"]
:requires ([tasks :as t])
:depends [clean]
:task (t/pack *command-line-args*)}
test {:doc "Runs unit tests"
:extra-paths ["test"]
:extra-deps {io.github.cognitect-labs/test-runner
{:git/tag "v0.5.1" :git/sha "dfb30dd"}}
:task (exec 'cognitect.test-runner.api/test)
:exec-args {:dirs ["test"]}}
deploy {:doc "Deploys to AWS using terraform"
:depends [pack]
:extra-paths ["scripts"]
:requires ([tasks :as t])
:task (t/deploy *command-line-args*)}
nrepl {:doc "Starts an nREPL server on a random free port"
:requires ([babashka.nrepl.server :as srv]
[babashka.fs :as fs])
:task (let [port (with-open [s (java.net.ServerSocket. 0)]
(.getLocalPort s))
port-file ".nrepl-port"]
(srv/start-server! {:host "localhost" :port port})
(spit port-file (str port))
(fs/delete-on-exit port-file)
(deref (promise)))}}}