-
Notifications
You must be signed in to change notification settings - Fork 0
/
bb.edn
38 lines (38 loc) · 2.61 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
34
35
36
37
38
{:paths ["src"]
:tasks
{download-apps {:doc "Downloads necessary apps (bitcoin core, ...)"
:task (let [apps [{:folder "bitcoin-core"
:url "https://bitcoin.org/bin/bitcoin-core-25.0/bitcoin-25.0-x86_64-linux-gnu.tar.gz"
:download "temp/bitcoin-core.tar.gz"
:extract (fn [opts] (shell "tar zxvf" (:download opts) "--directory" (str "apps/" (:folder opts))))}
{:folder "core-lightning"
:url "https://github.com/ElementsProject/lightning/releases/download/v23.11/clightning-v23.11-Ubuntu-22.04.tar.xz"
:download "temp/core-lightning.tar.xz"
:extract (fn [opts] (shell "tar xf" (:download %) "--directory" (str "apps/" (:folder %))))}]]
(shell "mkdir temp")
(doseq [{:keys [folder url download extract] :as opts} apps]
(shell "wget -O" download url)
(shell "mkdir -p" (str "apps/" folder))
(extract opts)))}
bitcoin-core {:doc "Bitcoin Core tasks"
:requires [bitcoin-world.tasks.bitcoin-core]
:task (bitcoin-world.tasks.bitcoin-core/daemon)}
bitcoin-cli {:doc "Commands through bitcoin-cli"
:requires [bitcoin-world.tasks.bitcoin-core]
:task (bitcoin-world.tasks.bitcoin-core/cli *command-line-args*)}
c-lightning-daemon {:doc "Core Lightning Daemon commands"
:requires [bitcoin-world.tasks.core-lightning]
:task (bitcoin-world.tasks.core-lightning/daemon (first *command-line-args*) (rest *command-line-args*))}
c-lightning-cli {:doc "Core Lightning CLI commands"
:requires [bitcoin-world.tasks.core-lightning]
:task (bitcoin-world.tasks.core-lightning/cli (first *command-line-args*) (rest *command-line-args*))}
build-graph {:doc "According to graph definition EDN start lightning nodes, fund & connect them"
:requires [bitcoin-world.tasks.build-graph]
:task (bitcoin-world.tasks.build-graph/cli *command-line-args*)}
run-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"]}
:org.babashka/cli {:coerce {:nses [:symbol]
:vars [:symbol]}}}}}