-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (47 loc) · 1.19 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
.PHONY: checks
checks:
cargo check
cargo test -- --nocapture
cargo clippy -- \
-W clippy::pedantic \
-W clippy::cast-possible-truncation \
-W clippy::cast-sign-loss \
-A clippy::redundant_closure_for_method_calls \
-A clippy::single_match_else \
-A clippy::uninlined-format-args \
-A clippy::missing_errors_doc
cargo fmt --check
.PHONY: clippy_nursery
clippy_nursery:
cargo clippy -- -W clippy::nursery
.PHONY: clippy_cargo
clippy_cargo:
cargo clippy -- -W clippy::cargo
# XXX Coverage recipes assume llvm-cov is installed:
.PHONY: coverage
coverage:
cargo llvm-cov --lib --ignore-filename-regex 'tests\.rs'
.PHONY: coverage_html
coverage_html:
cargo llvm-cov --lib --ignore-filename-regex 'tests\.rs' --open
.PHONY: install
install:
cargo install --path .
# Release =====================================================================
.PHONY: release
release:
$(MAKE) -s version_tag
$(MAKE) -s tags_push
$(MAKE) -s crate_publish
.PHONY: version_check
version_check:
cargo semver-checks
.PHONY: version_tag
version_tag:
git tag v$$(cargo pkgid | awk -F'#' '{print $$2}')
.PHONY: tags_push
tags_push:
git push --tags origin
.PHONY: crate_publish
crate_publish:
cargo publish