-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Justfile
80 lines (66 loc) · 2.27 KB
/
Justfile
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# This help screen
show-help:
just --list
# Test it was built ok
test:
unset GIT_MIT_AUTHORS_EXEC && RUST_BACKTRACE=1 cargo test
# Test the markdown in the docs directory
specdown: build
./bin/specdown ./docs/**.md ./docs/**/*.md ./README.md
# Benchmark
bench:
cargo bench
# Run a smoke test and see if the app runs
smoke-test: build
cargo run --bin git-mit -- -h
cargo run --bin git-mit-config -- -h
cargo run --bin git-mit-relates-to -- -h
cargo run --bin git-mit-install -- -h
cargo run --bin mit-commit-msg -- -h
cargo run --bin mit-pre-commit -- -h
cargo run --bin mit-prepare-commit-msg -- -h
# Build release version
build:
cargo build --release
# Build release version x86_64-apple-darwin
build-x86_64-apple-darwin:
rustup target install x86_64-apple-darwin
cargo build --release --target x86_64-apple-darwin
# Build release version aarch64-apple-darwin
build-aarch64-apple-darwin:
rustup target install aarch64-apple-darwin
cargo build --release --target aarch64-apple-darwin
# Build release version x86_64-pc-windows-msvc
build-x86_64-pc-windows-msvc:
rustup target install x86_64-pc-windows-msvc
cargo build --release --target x86_64-pc-windows-msvc
# Lint it
lint:
cargo +nightly fmt --all -- --check
cargo +nightly clippy --all-features -- -D warnings -Dclippy::all -D clippy::pedantic -D clippy::cargo -A clippy::multiple_crate_versions
cargo check
cargo audit
npx prettier --check **.yml **.yaml
# Publish to crates
publish-to-crates:
( cd mit-hook-test-helper && cargo publish )
( cd mit-commit-message-lints && cargo publish )
( cd mit-commit-msg && cargo publish )
( cd mit-pre-commit && cargo publish )
( cd mit-prepare-commit-msg && cargo publish )
( cd git-mit && cargo publish )
( cd git-mit-config && cargo publish )
( cd git-mit-install && cargo publish )
( cd git-mit-relates-to && cargo publish )
# Publish to crates
release:
versio release
# Format what can be formatted
fmt:
cargo +nightly fix --allow-dirty --allow-staged
cargo +nightly clippy --allow-dirty --allow-staged --fix -Z unstable-options --all-features -- -D warnings -Dclippy::all -D clippy::pedantic -D clippy::cargo -D clippy::nursery -A clippy::multiple_crate_versions
cargo +nightly fmt --all
npx prettier --write **.yml **.yaml
# Clean the build directory
clean:
cargo clean