chore: Use cargo-msrv to check the msrv instead of rustup
Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
9
justfile
9
justfile
@@ -13,7 +13,6 @@ set script-interpreter := ["/usr/bin/env", "bash"]
|
|||||||
JUST_EXECUTABLE := "just -u -f " + justfile()
|
JUST_EXECUTABLE := "just -u -f " + justfile()
|
||||||
header := "Available tasks:\n"
|
header := "Available tasks:\n"
|
||||||
# Get the MSRV from the Cargo.toml
|
# Get the MSRV from the Cargo.toml
|
||||||
msrv := `cat Cargo.toml | grep "rust-version" | sed 's/.*"\(.*\)".*/\1/'`
|
|
||||||
tag_change_body := '''{% for group, commits in commits | group_by(attribute="group") %}
|
tag_change_body := '''{% for group, commits in commits | group_by(attribute="group") %}
|
||||||
|
|
||||||
{{ group | upper_first }}
|
{{ group | upper_first }}
|
||||||
@@ -33,16 +32,16 @@ ci: && msrv _done_ci
|
|||||||
cargo build -q
|
cargo build -q
|
||||||
echo "🔍 Checking code formatting..."
|
echo "🔍 Checking code formatting..."
|
||||||
cargo fmt -q -- --check
|
cargo fmt -q -- --check
|
||||||
taplo fmt --check --config ./.taplo.toml
|
RUST_LOG=none taplo fmt --check --config ./.taplo.toml || (echo "❌Toml files is not properly formatted" && exit 1)
|
||||||
echo "🧹 Running linter checks..."
|
echo "🧹 Running linter checks..."
|
||||||
cargo clippy -q -- -D warnings
|
cargo clippy -q -- -D warnings
|
||||||
echo "🧪 Running tests..."
|
echo "🧪 Running tests..."
|
||||||
cargo test
|
cargo test -q
|
||||||
|
|
||||||
# Check that the current MSRV is correct
|
# Check that the current MSRV is correct
|
||||||
msrv:
|
msrv:
|
||||||
echo "🔧 Verifying MSRV ({{msrv}})..."
|
echo "🔧 Verifying MSRV..."
|
||||||
rustup -q run --install {{msrv}} cargo check -q
|
cargo-msrv verify
|
||||||
echo "✅ MSRV verification passed"
|
echo "✅ MSRV verification passed"
|
||||||
|
|
||||||
_done_ci:
|
_done_ci:
|
||||||
|
|||||||
Reference in New Issue
Block a user