chore: Create Justfile
Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
parent
3be8c52f23
commit
a052e7f440
1 changed files with 26 additions and 0 deletions
26
Justfile
Normal file
26
Justfile
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
set shell := ["/usr/bin/env", "bash", "-c"]
|
||||||
|
|
||||||
|
JUST_EXECUTABLE := "just -u -f " + justfile()
|
||||||
|
header := "Available tasks:\n"
|
||||||
|
# Get the MSRV from the Cargo.toml
|
||||||
|
msrv := `cat Cargo.toml | grep "rust-version" | sed 's/.*"\(.*\)".*/\1/'`
|
||||||
|
|
||||||
|
|
||||||
|
_default:
|
||||||
|
@{{JUST_EXECUTABLE}} --list-heading "{{header}}" --list
|
||||||
|
|
||||||
|
@test test_name='':
|
||||||
|
cargo test {test_name}
|
||||||
|
|
||||||
|
# Run the CI
|
||||||
|
@ci: && msrv test
|
||||||
|
cargo build --all-targets
|
||||||
|
cargo fmt --all -- --check
|
||||||
|
cargo clippy --all-targets -- -D warnings
|
||||||
|
|
||||||
|
# Check that the current MSRV is correct
|
||||||
|
@msrv:
|
||||||
|
rustup toolchain install {{msrv}}
|
||||||
|
echo "Checking MSRV ({{msrv}})"
|
||||||
|
cargo +{{msrv}} check -q --workspace
|
||||||
|
echo "MSRV is correct"
|
Loading…
Reference in a new issue