-
Notifications
You must be signed in to change notification settings - Fork 135
/
Justfile
39 lines (31 loc) · 975 Bytes
/
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
# Bump all deps, including incompatible version upgrades
bump:
just ensure-command cargo-upgrade
cargo update
cargo upgrade --incompatible
cargo test --workspace
# Run the test suite with nextest
nextest:
just ensure-command cargo-nextest
cargo nextest run --workspace
# If you change anything in here, make sure to also adjust the lint CI job!
lint:
just ensure-command cargo-nextest
cargo fmt --all -- --check
taplo format --check
cargo clippy --tests --workspace -- -D warnings
format:
just ensure-command taplo
cargo fmt
taplo format
# Ensures that one or more required commands are installed
ensure-command +command:
#!/usr/bin/env bash
set -euo pipefail
read -r -a commands <<< "{{ command }}"
for cmd in "${commands[@]}"; do
if ! command -v "$cmd" > /dev/null 2>&1 ; then
printf "Couldn't find required executable '%s'\n" "$cmd" >&2
exit 1
fi
done