This repository was archived by the owner on May 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
52 lines (41 loc) · 1.35 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
# Please, follow the target naming conventions:
# https://www.gnu.org/prep/standards/html_node/Standard-Targets.html
.PHONY: all
all:
@cargo build --release
.PHONY: clean
clean:
@cargo clean
.PHONY: check/clippy
check/clippy:
@cargo clippy --workspace -- -D warnings
.PHONY: check/fmt
check/fmt:
@cargo fmt -- --check
.PHONY: check/test
check/test:
@cargo test --workspace
.PHONY: check
check: check/test check/clippy check/fmt
.PHONY: html docs
html docs:
@mdbook build
@touch docs
.PHONY: src/statics
src/statics:
@curl 'https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.0/css/bulma.min.css' --output 'src/statics/bulma.min.css'
@curl 'https://unpkg.com/bulma-prefers-dark@0.1.0-beta.0/css/bulma-prefers-dark.css' --output 'src/statics/bulma-prefers-dark.css'
@curl --location 'https://github.com/chartjs/Chart.js/releases/download/v2.9.3/Chart.bundle.min.js' --output 'src/statics/Chart.bundle.min.js'
@curl 'https://use.fontawesome.com/releases/v5.13.1/fontawesome-free-5.13.1-web.zip' --output src/statics/fontawesome.zip
@unzip -u src/statics/fontawesome.zip -d src/statics/
@rm src/statics/fontawesome.zip
.PHONY: tag
tag:
@$(eval VERSION := $(shell cargo run -- --version))
@git tag -a $(VERSION) -m $(VERSION)
.PHONY: tag/publish
tag/publish: tag
@git push origin $(shell cargo run -- --version)
.PHONY: publish
publish: tag/publish
@cargo publish