-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (47 loc) · 1.17 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
all: ci
.PHONY: help
help:
@echo "Fallacious Rooster Makefile Help"
@echo "- ci-frontend Run CI only for the frontend"
@echo "- ci-server Run CI only for the server"
@echo "- ci Run all CI jobs"
@echo "- server-fmt-fix Apply fixes to formatting of the server"
.PHONY: ci
ci: ci-frontend ci-server
.PHONY: ci-frontend
ci-frontend: frontend-eslint
.PHONY: ci-server
ci-server: server-fmt server-clippy server-test
.PHONY: server-fmt
server-fmt: install-rustfmt
cd server && \
cargo fmt --all --check
.PHONY: server-fmt-fix
server-fmt-fix: install-rustfmt
cd server && \
cargo fmt --all
.PHONY: server-clippy
server-clippy: install-clippy
cd server && \
cargo clippy
.PHONY: server-test
server-test: install-rust
cd server && \
cargo test
.PHONY: frontend-eslint
frontend-eslint: install-frontend-modules
cd frontend && \
yarn eslint
.PHONY: install-rustfmt
install-rustfmt: install-rust
rustup component add rustfmt
.PHONY: install-clippy
install-clippy: install-rust
rustup component add clippy
.PHONY: install-frontend-modules
install-frontend-modules:
cd frontend && \
yarn
.PHONY: install-rust
install-rust:
rustup toolchain install stable --profile minimal