-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
60 lines (54 loc) · 1.45 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
publish: publish_dry
@echo "---------------"
@echo "Running publish"
@echo "---------------"
cargo publish
publish_dry: test_docker
@echo "-------------------"
@echo "Running publish_dry"
@echo "-------------------"
cargo publish --dry-run
test_docker: setup_tests
@echo "-------------------"
@echo "Running test_docker"
@echo "-------------------"
docker build --no-cache --target tests -t tinty .
cargo fmt --all --check
test: setup_tests
@echo "------------"
@echo "Running test"
@echo "------------"
RUST_TEST_THREADS=1 cargo test --release $(TINTY_RUST_TEST)
setup_tests: build
@echo "-----------------"
@echo "Creating fixtures"
@echo "-----------------"
./scripts/create_fixtures
build:
@echo "-------------"
@echo "Running build"
@echo "-------------"
cargo build --release
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