Skip to content

Commit f071ce3

Browse files
committed
build: add justfile
1 parent 093f1dd commit f071ce3

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

justfile

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

0 commit comments

Comments
 (0)