Always use cargo +nightly in Justfile
This commit is contained in:
32
Justfile
32
Justfile
@@ -4,37 +4,39 @@ set shell := ["/bin/bash", "-c"]
|
||||
|
||||
static_target := "x86_64-unknown-linux-musl"
|
||||
|
||||
cargo := "cargo +nightly"
|
||||
|
||||
check: fmt-check lint test
|
||||
cargo check
|
||||
{{cargo}} check
|
||||
|
||||
clean:
|
||||
cargo clean
|
||||
{{cargo}} clean
|
||||
git clean -f -d -X
|
||||
|
||||
fmt:
|
||||
cargo fmt
|
||||
{{cargo}} fmt
|
||||
git ls-files | grep '\.py$' | xargs isort
|
||||
git ls-files | grep '\.py$' | xargs black
|
||||
git ls-files | grep '\.sh$' | xargs -L 1 shfmt --indent 4 --write
|
||||
|
||||
fmt-check:
|
||||
cargo fmt --check
|
||||
{{cargo}} fmt --check
|
||||
git ls-files | grep '\.py$' | xargs black --check
|
||||
git ls-files | grep '\.sh$' | xargs -L 1 shfmt --indent 4 --diff
|
||||
|
||||
lint:
|
||||
cargo clippy --no-deps -- -Dwarnings
|
||||
{{cargo}} clippy --no-deps -- -Dwarnings
|
||||
git ls-files | grep '\.py$' | xargs ruff --ignore E501
|
||||
git ls-files | grep '\.sh$' | xargs -L 1 shellcheck --norc
|
||||
|
||||
lint-fix:
|
||||
cargo clippy --no-deps --fix
|
||||
{{cargo}} clippy --no-deps --fix
|
||||
|
||||
build-release:
|
||||
cargo build --release
|
||||
{{cargo}} build --release
|
||||
|
||||
build-release-static:
|
||||
cargo build --release --target {{static_target}} --features=static-build
|
||||
{{cargo}} build --release --target {{static_target}} --features=static-build
|
||||
|
||||
pushall:
|
||||
for r in $(git remote) ; do \
|
||||
@@ -50,27 +52,27 @@ test-binary:
|
||||
env \
|
||||
GITHUB_API_BASEURL=http://rest:5000/github \
|
||||
GITLAB_API_BASEURL=http://rest:5000/gitlab \
|
||||
cargo build --profile e2e-tests --target {{static_target}} --features=static-build
|
||||
{{cargo}} build --profile e2e-tests --target {{static_target}} --features=static-build
|
||||
|
||||
install:
|
||||
cargo install --path .
|
||||
{{cargo}} install --path .
|
||||
|
||||
install-static:
|
||||
cargo install --target {{static_target}} --features=static-build --path .
|
||||
{{cargo}} install --target {{static_target}} --features=static-build --path .
|
||||
|
||||
build:
|
||||
cargo build
|
||||
{{cargo}} build
|
||||
|
||||
build-static:
|
||||
cargo build --target {{static_target}} --features=static-build
|
||||
{{cargo}} build --target {{static_target}} --features=static-build
|
||||
|
||||
test: test-unit test-integration test-e2e
|
||||
|
||||
test-unit +tests="":
|
||||
cargo test --lib --bins -- --show-output {{tests}}
|
||||
{{cargo}} test --lib --bins -- --show-output {{tests}}
|
||||
|
||||
test-integration:
|
||||
cargo test --test "*"
|
||||
{{cargo}} test --test "*"
|
||||
|
||||
test-e2e +tests=".": test-binary
|
||||
cd ./e2e_tests \
|
||||
|
||||
Reference in New Issue
Block a user