Skip to content

Commit 789c77b

Browse files
committed
feat: add justfile
1 parent ec6e59b commit 789c77b

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ of the PR were done in a specific way -->
2020

2121
* [ ] I've signed all my commits
2222
* [ ] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
23-
* [ ] I ran `cargo +nightly fmt` and `cargo clippy` before committing
23+
* [ ] I ran `just p` before pushing
2424

2525
#### New Features:
2626

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ It is built upon the excellent [`rust-bitcoin`] and [`rust-miniscript`] crates.
3636
There is currently only one published crate in this repository:
3737

3838
- [`wallet`](./wallet): Contains the central high level `Wallet` type that is built from the low-level mechanisms provided by the other components.
39-
39+
4040
Crates that `bdk_wallet` depends on are found in the [`bdk`] repository.
4141

4242
Fully working examples of how to use these components are in `/examples`:
@@ -55,6 +55,12 @@ The libraries in this repository maintain a MSRV of 1.63.0.
5555

5656
To build with the MSRV of 1.63.0 you will need to pin dependencies by running the [`pin-msrv.sh`](./ci/pin-msrv.sh) script.
5757

58+
## Just
59+
60+
This project has a [`justfile`](/justfile) for easy command running. You must have [`just`](https://github.com/casey/just) installed.
61+
62+
To see a list of available recipes: `just -l`
63+
5864
## License
5965

6066
Licensed under either of

justfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
alias b := build
2+
alias c := check
3+
alias f := fmt
4+
alias t := test
5+
alias p := pre-push
6+
7+
# Build the project
8+
build:
9+
cargo build
10+
11+
# Check code: formatting, compilation, linting, and commit signature
12+
check:
13+
cargo +nightly fmt --all -- --check
14+
cargo check --workspace --exclude 'example_*' --all-features
15+
cargo clippy --all-features --all-targets -- -D warnings
16+
@[ "$(git log --pretty='format:%G?' -1 HEAD)" = "N" ] && \
17+
echo "\n⚠️ Unsigned commit: BDK requires that commits be signed." || \
18+
true
19+
20+
# Format all code
21+
fmt:
22+
cargo +nightly fmt
23+
24+
# Run all tests on the workspace with all features
25+
test:
26+
cargo test --workspace --exclude 'example_*' --all-features
27+
28+
# Run pre-push suite: format, check, and test
29+
pre-push: fmt check test

0 commit comments

Comments
 (0)