Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Commit 7cbda9c

Browse files
Merge #379
379: chore: Set Makefile to run on regtest by default r=klochowicz a=klochowicz Makefile is for devs, so let's make it more convenient. note: plain `flutter run` still will require a `NETWORK` override Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
2 parents 3761e78 + 99c377b commit 7cbda9c

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.DEFAULT_GOAL := help
22
PROJECTNAME=$(shell basename "$(PWD)")
3+
# Default bitcoin network to run the project with `make`
4+
BITCOIN_NETWORK=regtest
35

46
# Menu (visible if you type `make` or `make help`)
57
.PHONY: help
@@ -13,7 +15,7 @@ help: Makefile
1315
## lint: Lint all the code (both Rust and Flutter)
1416
lint: clippy lint-flutter
1517

16-
## all: Re-generate bindings, compile Rust lib, and run the Flutter project
18+
## all: Re-generate bindings, compile Rust lib, and run the Flutter project on regtest
1719
all: FORCE gen native run
1820

1921
## deps: Install missing dependencies.
@@ -48,7 +50,7 @@ flutter-format:
4850
clean:
4951
flutter clean
5052
cargo clean
51-
# mobile targets don't build whole workspace, but just ten_ten_one crate
53+
# mobile targets don't build whole workspace, but just ten_ten_one crate
5254
cd rust && cargo clean
5355

5456
## native: Build Rust library for native target (to run on your desktop)
@@ -87,7 +89,7 @@ gen: FORCE
8789

8890
## run: Run the app (need to pick the target, if no mobile emulator is running)
8991
run:
90-
flutter run
92+
NETWORK=${BITCOIN_NETWORK} flutter run
9193

9294
clippy: FORCE
9395
cargo clippy --all-targets -- -D warnings
@@ -99,8 +101,8 @@ lint-flutter:
99101
test: FORCE
100102
cargo test
101103

102-
## maker: Build & run the maker (counterparty to 10101 trading component)
104+
## maker: Build & run the maker on regtest (counterparty to 10101 trading component)
103105
maker: FORCE
104-
cargo run --bin maker
106+
NETWORK=${BITCOIN_NETWORK} cargo run --bin maker
105107

106108
FORCE: ;

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ To run on `regtest` you have to change the default network (`testnet`) to `regte
8686

8787
Example command for maker:
8888

89-
`NETWORK=regtest make maker`
89+
`make maker`
90+
91+
(`make` runs prepend NETWORK=regtest automatically)
9092

9193
Example command for taker:
9294

0 commit comments

Comments
 (0)