-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
41 lines (35 loc) · 1.1 KB
/
justfile
File metadata and controls
41 lines (35 loc) · 1.1 KB
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
check:
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery
cargo audit
cargo deny check all
cargo test
test:
cargo test
pre-commit:
#!/usr/bin/env bash
set -euo pipefail
./scripts/scan-staged-secrets.sh
before_fmt_diff="$(mktemp)"
after_fmt_diff="$(mktemp)"
trap 'rm -f "$before_fmt_diff" "$after_fmt_diff"' EXIT
git diff --name-only -- . >"$before_fmt_diff"
cargo fmt --all
git diff --name-only -- . >"$after_fmt_diff"
if ! cmp -s "$before_fmt_diff" "$after_fmt_diff"; then
echo "cargo fmt updated files. Review and stage the formatting changes, then commit again." >&2
exit 1
fi
cargo clippy --all-targets --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery
cargo audit
cargo deny check all
cargo test
release *args:
git pull --rebase
cargo release {{args}}
bump version:
cargo release version {{version}} --execute --no-confirm
install:
cargo install --path .
run *args:
cargo run --bin ebook2audiobook -- {{args}}