-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
79 lines (70 loc) · 2.12 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
lib_publish: lib_publish_dry
@echo "---------------"
@echo "Running publish"
@echo "---------------"
cargo publish --package tinted-builder
cli_publish: cli_publish_dry
@echo "---------------"
@echo "Running publish"
@echo "---------------"
cargo publish --package tinted-builder-rust
lib_publish_dry: lib_test
@echo "----------------------"
@echo "Running lib publish_dry"
@echo "----------------------"
cargo publish --dry-run --package tinted-builder
cli_publish_dry: cli_test
@echo "----------------------"
@echo "Running cli publish_dry"
@echo "----------------------"
cargo publish --dry-run --package tinted-builder-rust
test: lib_test cli_test
@echo "-------------"
@echo "Running tests"
@echo "-------------"
lib_test: lib_build
@echo "-----------------"
@echo "Running lib tests"
@echo "-----------------"
cargo test --package tinted-builder --release $(TINTED_BUILDER_RUST_TEST)
cargo fmt --package tinted-builder --check
cli_test: cli_build
@echo "-----------------"
@echo "Running cli tests"
@echo "-----------------"
cargo test --package tinted-builder-rust --release $(TINTED_BUILDER_RUST_TEST)
cargo fmt --package tinted-builder-rust --check
lib_build:
@echo "-----------------"
@echo "Running lib build"
@echo "-----------------"
cargo build --release --package tinted-builder
cargo deny check
cli_build:
@echo "-----------------"
@echo "Running cli build"
@echo "-----------------"
cargo build --release --package tinted-builder-rust
cargo deny check
install:
@echo "---------------"
@echo "Installing deps"
@echo "---------------"
@if [ -z "$$(command -v cargo)" ]; then \
echo "Installing rustup"; \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; \
else \
echo "rustup already installed"; \
fi
@if [ ! "$$(cargo about --version &>/dev/null)" ]; then \
echo "Installing cargo about"; \
cargo install --locked cargo-about; \
else \
echo "cargo-about already installed"; \
fi
@if [ ! "$$(cargo deny --version &>/dev/null)" ]; then \
echo "Installing cargo deny"; \
cargo install --locked cargo-deny; \
else \
echo "cargo-deny already installed"; \
fi