-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
58 lines (45 loc) · 1.51 KB
/
Copy pathjustfile
File metadata and controls
58 lines (45 loc) · 1.51 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Show commands before running (helps debug failures)
set shell := ["bash", "-euo", "pipefail", "-c"]
# Recipes read `ALCHEMY_API_KEY` (token validation, freshness gate) from the
# environment. The file is absent in CI, where the value comes from secrets.
set dotenv-load := true
set dotenv-required := false
GREEN := "\\033[0;32m"
RED := "\\033[0;31m"
NORMAL := "\\033[0m"
# Default recipe
default:
@just --list
# --- Generation ---
# Regenerate `data/generated/` from the authored inputs and the pinned dependencies
generate:
cargo run --package anoma-risc0-kind-tables --features generate --bin generate
# Verify the committed generated tables match a regeneration
generate-check: generate
#!/usr/bin/env bash
set -euo pipefail
if ! git diff --exit-code -- crates/kind-tables/data/generated; then
printf '{{RED}}The generated tables are stale. Run `just generate` and commit the diff.{{NORMAL}}\n'
exit 1
fi
printf '{{GREEN}}The generated tables match the source.{{NORMAL}}\n'
# --- Crates ---
# Clean all crates
crates-clean:
cargo clean
# Build all crates
crates-build *args:
cargo build {{ args }}
# Test all crates
crates-test *args:
cargo test {{ args }}
# Lint all crates (clippy)
crates-lint:
cargo clippy --all-targets --no-deps -- -Dwarnings
cargo clippy --all-targets --features generate --no-deps -- -Dwarnings
# Format all crates
crates-fmt *args:
cargo fmt --all {{ args }}
# Check all crates formatting
crates-fmt-check:
cargo fmt --all -- --check