-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (34 loc) · 1 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
all: test
build:
@cargo build --all-features
doc:
@cargo doc --all-features
test:
@cargo insta test --review
reset-db:
cd tests/data && ./reload_db.sh
# update-sanpshots:
# TRYCMD=overwrite cargo test --test cli_snapshot_testing
# sanpshot-testing: update-sanpshots
# TRYCMD=dump cargo test --test cli_snapshot_testing
cargotest:
@echo "CARGO TESTS"
@rustup component add rustfmt 2> /dev/null
@cargo test
format:
@rustup component add rustfmt 2> /dev/null
@cargo fmt --all
toolchain:
rustup toolchain install nightly
rustup component add rust-src --toolchain nightly
release-apple:
cargo +nightly build -Z build-std=std,panic_abort --target x86_64-apple-darwin --release
release-apple-m1:
cargo +nightly build -Z build-std=std,panic_abort --target aarch64-apple-darwin --release
format-check:
@rustup component add rustfmt 2> /dev/null
@cargo fmt --all -- --check
lint:
@rustup component add clippy 2> /dev/null
@cargo clippy
.PHONY: all doc test cargotest format format-check lint update-readme