-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
45 lines (36 loc) · 913 Bytes
/
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
.PHONY: check
check:
cargo check
.PHONY: checkall
checkall:
cargo check --all-targets --all-features
.PHONY: build
build:
cargo build
.PHONY: buildall
buildall:
cargo build --all-targets --all-features
.PHONY: test
test: TEST = ''
test:
cargo test --verbose -- $(TEST)
.PHONY: fmt
fmt:
cargo fmt -- --check
.PHONY: clippy
clippy:
cargo clippy -- -D warnings
.PHONY: udeps
udeps:
cargo +nightly udeps
.PHONY: check-version
check-version:
@echo "Check Cargo.toml version against git version"
@toml_version=`sed -n -e 's/^version = "\(.*\)"/\1/p' Cargo.toml`; \
git_version=`git describe --tags $$(git rev-list --tags --max-count=1) | cut -c2-`; \
[ "$$toml_version" = "$$git_version" ] || \
(echo "Cargo.toml version ($$toml_version) does not match git version ($$git_version)!" && \
exit 1)
# Quick tests to run before creating a PR.
.PHONY: pr
pr: fmt buildall test clippy check-version