chore: Add Justfile
Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
parent
2b1546a181
commit
61a51be953
1 changed files with 30 additions and 0 deletions
30
Justfile
Normal file
30
Justfile
Normal file
|
@ -0,0 +1,30 @@
|
|||
# This justfile is for the contrbutors of this project, not for the end user.
|
||||
#
|
||||
# Requirements for this justfile:
|
||||
# - Linux distribution
|
||||
# - just (Of course) <https://github.com/casey/just>
|
||||
# - cargo (For the build and tests) <https://doc.rust-lang.org/cargo/getting-started/installation.html>
|
||||
|
||||
set shell := ["/usr/bin/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
|
||||
|
||||
# Run the CI
|
||||
@ci: && msrv
|
||||
cargo build -q
|
||||
cargo fmt -- --check
|
||||
cargo clippy -- -D warnings
|
||||
|
||||
# Check that the current MSRV is correct
|
||||
@msrv:
|
||||
rustup toolchain install {{msrv}}
|
||||
echo "Checking MSRV ({{msrv}})"
|
||||
cargo +{{msrv}} check -q
|
||||
echo "MSRV is correct"
|
Loading…
Reference in a new issue