-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
59 lines (44 loc) · 1.72 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
# dev tooling and versions
RUN_THAT_APP_VERSION = 0.5.0
build: # builds the test binary
cargo build
cuke: build # runs all end-to-end tests
rm -rf tmp
cargo test --test=cucumber
cukethis: build # runs only end-to-end tests with a @this tag
rm -rf tmp
cargo test --test cucumber -- -t @this
fix: tools/rta@${RUN_THAT_APP_VERSION} # applies all auto-fixers
cargo +nightly fmt
cargo +nightly fix --allow-dirty
cargo clippy --fix --allow-dirty
tools/rta dprint fmt
help: # shows all available Make commands
cat Makefile | grep '^[^ ]*:' | grep -v '.SILENT:' | grep -v help | sed 's/:.*#/#/' | column -s "#" -t
install: # installs the binary on the current machine
cargo install --path .
lint: tools/rta@${RUN_THAT_APP_VERSION} # finds code smells
git diff --check
tools/rta dprint check
cargo clippy --all-targets --all-features -- --deny=warnings
tools/rta actionlint
run: # runs in the local directory
cargo run --quiet
setup: # install development dependencies on this computer
rustup toolchain add nightly
rustup component add rustfmt --toolchain nightly
test: unit cuke lint # run all tests
unit: # runs the unit tests
cargo test
update: tools/rta@${RUN_THAT_APP_VERSION} # updates all dependencies
cargo install cargo-edit
cargo upgrade --incompatible
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
.SILENT:
.DEFAULT_GOAL := help