-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjustfile
59 lines (47 loc) · 1.4 KB
/
justfile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
set dotenv-load
@_choose:
just --choose --unsorted
# Perform all verifications (compile, test, lint, etc.)
verify: test lint doc
cargo semver-checks
cargo msrv verify
# Watch the source files and run `just verify` when source changes
watch:
cargo watch --delay 0.1 --clear --why -- just verify
# Run the bevy example
run-bevy-example:
cargo run --example bevy
# Run the tests
test:
cargo hack check --feature-powerset
cargo hack test --tests --each-feature
cargo test --examples --all-features
cargo test --doc --all-features
# Run the static code analysis
lint:
cargo fmt -- --check
cargo hack clippy --each-feature --all-targets
# Build the documentation
doc *args:
cargo doc --all-features --no-deps {{args}}
# Open the documentation page
doc-open: (doc "--open")
# Clean up compilation output
clean:
rm -rf target
rm -f Cargo.lock
rm -rf node_modules
# Install cargo dev-tools used by the `verify` recipe (requires rustup to be already installed)
install-dev-tools:
rustup install stable
rustup override set stable
cargo install cargo-hack cargo-watch cargo-msrv cargo-semver-checks
# Install a git hook to run tests before every commits
install-git-hooks:
echo '#!/usr/bin/env sh' > .git/hooks/pre-push
echo 'just verify' >> .git/hooks/pre-push
chmod +x .git/hooks/pre-push
release *args: verify
test $GITHUB_TOKEN
test $CARGO_REGISTRY_TOKEN
cargo release {{args}}