From 4c738d027a4c794e18251c7dcc0e94ca34276f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Thu, 4 May 2023 11:31:42 +0200 Subject: [PATCH] Always use cargo +nightly in Justfile --- Justfile | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/Justfile b/Justfile index de0712a..4e906f4 100644 --- a/Justfile +++ b/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 \