mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-25 05:57:34 +00:00
40 lines
1.1 KiB
Makefile
40 lines
1.1 KiB
Makefile
ifeq ($(CI), true)
|
|
ci_color_always := --color=always
|
|
endif
|
|
|
|
ifeq ($(OS), Windows_NT)
|
|
NIX := false
|
|
else
|
|
NIX := true
|
|
endif
|
|
|
|
.PHONY: build clean install test uninstall
|
|
|
|
build:
|
|
cargo build $(ci_color_always)
|
|
|
|
clean:
|
|
cargo clean $(ci_color_always)
|
|
|
|
install:
|
|
cargo install --path=. $(ci_color_always)
|
|
|
|
ifeq ($(NIX), true)
|
|
test:
|
|
nix-shell --pure --run 'cargo fmt -- --check --files-with-diff $(ci_color_always)'
|
|
nix-shell --pure --run 'cargo check --all-features $(ci_color_always)'
|
|
nix-shell --pure --run 'cargo clippy --all-features $(ci_color_always) -- --deny warnings --deny clippy::all'
|
|
nix-shell --pure --run 'cargo test --all-features --no-fail-fast $(ci_color_always)'
|
|
nix-shell --pure --run 'cargo audit --deny warnings $(ci_color_always) --ignore=RUSTSEC-2020-0095'
|
|
else
|
|
test:
|
|
cargo fmt -- --check --files-with-diff $(ci_color_always)
|
|
cargo check --all-features $(ci_color_always)
|
|
cargo clippy --all-features $(ci_color_always) -- --deny warnings --deny clippy::all
|
|
cargo test --no-fail-fast $(ci_color_always)
|
|
cargo audit --deny warnings $(ci_color_always) --ignore=RUSTSEC-2020-0095
|
|
endif
|
|
|
|
uninstall:
|
|
cargo uninstall $(ci_color_always)
|