forked from ajeetdsouza/zoxide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (32 loc) · 1.08 KB
/
Copy pathMakefile
File metadata and controls
39 lines (32 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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)'
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)
endif
uninstall:
cargo uninstall $(ci_color_always)