[bisq-network/bisq] Add Makefile for automating localnet setup (#3718)

Julian Knutsen notifications at github.com
Mon Dec 2 21:56:31 UTC 2019


julianknutsen commented on this pull request.



> +	# fails to bind to one of the listed block notification ports
+	echo exit 0 >> .localnet/bitcoind/blocknotify
+
+# Alias '.localnet' to 'localnet' so the target is discoverable in tab
+# completion
+localnet: .localnet
+
+# Deploy a complete localnet by running all required Bitcoin and Bisq
+# nodes, each in their own named screen window. If you are not a screen
+# user, you'll need to manually run each of the targets listed below
+# commands manually in a separate terminal or as background jobs.
+deploy: setup
+	# create a new screen session named 'localnet'
+	screen -dmS localnet
+	# deploy each node in its own named screen window
+	targets=('bitcoind' 'seednode' 'seednode2' 'alice' 'bob' 'mediator'); \

The Makefile didn't specify the SHELL variable so mine defaulted to /bin/sh which doesn't support the array syntax here. Not sure if there is a shell agnostic way to do it, but adding SHELL=/bin/bash to the Makefile fixed it locally.

```
julian at dev:~/bisq$ make deploy
# create a new screen session named 'localnet'
screen -dmS localnet
# deploy each node in its own named screen window
targets=('bitcoind' 'seednode' 'seednode2' 'alice' 'bob' 'mediator'); \
for t in "${targets[@]}"; do \
	screen -S localnet -X screen -t $t; \
	screen -S localnet -p $t -X stuff "make $t\n"; \
done;
/bin/sh: 1: Syntax error: "(" unexpected
make: *** [Makefile:156: deploy] Error 2

```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/3718#pullrequestreview-325769916
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191202/ee34dc5c/attachment.html>


More information about the bisq-github mailing list