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