-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (39 loc) · 1.6 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
# dev tooling and versions
RUN_THAT_APP_VERSION = 0.5.0
cuke: # runs the feature tests
cargo build
cargo test --test cucumber
cukethis: target/debug/mrt # runs only end-to-end tests with a @this tag
cargo build
cargo test --test cucumber -- -t @this
fix: tools/rta@${RUN_THAT_APP_VERSION} # auto-corrects issues
tools/rta dprint fmt
cargo +nightly fmt
cargo +nightly fix --allow-dirty
help: # shows all available Make commands
cat Makefile | grep '^[^ ]*:' | grep -v '.PHONY' | grep -v '.SILENT:' | grep '#' | grep -v help | sed 's/:.*#/#/' | column -s "#" -t
install: # installs the binary in the system
cargo install --path .
lint: tools/rta@${RUN_THAT_APP_VERSION} # checks formatting
tools/rta dprint check
cargo clippy --all-targets --all-features -- --deny=warnings
cargo +nightly fmt -- --check
git diff --check
tools/rta actionlint
setup: # install development dependencies on this computer
rustup toolchain add nightly
rustup component add rustfmt --toolchain nightly
test: unit lint cuke # runs all tests
unit: # runs the unit tests
cargo test
update: tools/rta@${RUN_THAT_APP_VERSION} # updates the dependencies
cargo upgrade
tools/rta --update
# --- HELPER TARGETS --------------------------------------------------------------------------------------------------------------------------------
tools/rta@${RUN_THAT_APP_VERSION}:
@rm -f tools/rta* tools/rta
@(cd tools && curl https://raw.githubusercontent.com/kevgo/run-that-app/main/download.sh | sh)
@mv tools/rta tools/rta@${RUN_THAT_APP_VERSION}
@ln -s rta@${RUN_THAT_APP_VERSION} tools/rta
.DEFAULT_GOAL := help
.SILENT: