-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
103 lines (74 loc) · 1.9 KB
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
PROJ = rucksack
BIN_DIR = ./bin
BIN = target/release/$(PROJ)
default: all
all: clean deps build lint test integration
auth:
@echo "Copy and paste the following in the terminal where you"
@echo "will be executing cargo commands:"
@echo
@echo ' eval $$(ssh-agent -s) && ssh-add'
@echo
$(BIN_DIR):
mkdir -p $(BIN_DIR)
build: $(BIN_DIR)
@cargo build --release
@rm -f $(BIN_DIR)/*
@cd rucksack && cargo install --path ./ --root ../
lint:
@cargo +nightly clippy --version
@cargo +nightly clippy --all-targets --all-features -- --no-deps -D clippy::all
cicd-lint:
@cargo clippy --version
@cargo clippy --all-targets --all-features -- --no-deps -D clippy::all
check:
@cargo deny check
@cargo +nightly udeps
test:
@RUST_BACKTRACE=1 cargo test
test-all: list check test
integration:
@./tests/rucksack.sh
@./tests/rucksack_dev.sh
deps:
@cargo update
publish-lib:
@cd rucksack-lib && cargo publish
publish-db:
@cd rucksack-db && cargo publish
publish: publish-lib publish-db
publish-cli:
@cd rucksack && cargo publish
publish-all: publish publish-cli
tag:
@git tag $$($(BIN_DIR)/$(PROJ) -v)
@git push --tags
release: build lint test tag publish
clean:
@cargo clean
@rm -f $(BIN_DIR)/$(PROJ)
clean-all: clean
@rm .crates.toml .crates2.json Cargo.lock
fresh-all: clean-all all
fresh: clean all
nightly:
@rustup toolchain install nightly
docs: DOCS_PATH = target/doc/rucksack
docs:
@cargo doc --all-features --no-deps --workspace
@echo
@echo "Docs are available here:"
@echo " * $(DOCS_PATH)"
@echo " * file://$(shell pwd)/$(DOCS_PATH)/index.html"
@echo
open-docs:
@cargo doc --all-features --no-deps --workspace --open
install-cargo-deny:
@echo ">> Installing cargo deny ..."
@cargo install --locked cargo-deny
setup-cargo-deny: install-cargo-deny
@echo ">> Setting up cargo deny ..."
@cargo deny init
install-udeps:
@echo ">> Setting up cargo udeps ..."
@cargo install cargo-udeps --locked