Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
178 lines (138 loc) · 6.51 KB
/
Copy pathjustfile
File metadata and controls
178 lines (138 loc) · 6.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
set allow-duplicate-recipes := true
set allow-duplicate-variables := true
set shell := ["bash", "-euo", "pipefail", "-c"]
# ---------------------------------------------------------------------------- #
# DEPENDENCIES #
# ---------------------------------------------------------------------------- #
# Rust: https://rust-lang.org/tools/install
cargo := require("cargo")
rustc := require("rustc")
# ---------------------------------------------------------------------------- #
# RECIPES #
# ---------------------------------------------------------------------------- #
# Show available commands
default:
@just --list
# Build the program
build:
cargo build
# Run the program
run:
cargo run
# Check code formatting
format-check:
cargo fmt --all --check
# Format code
format:
cargo fmt --all
alias fmt := format
# Run clippy lints
lint:
cargo clippy -- --deny warnings
# Run all code checks
full-check: format-check lint
alias fc := full-check
# Fix formatting (alias for format)
full-write: format
alias fw := full-write
# Run tests
test:
cargo test
# Run the same checks CI runs locally (full-check + tests)
ci: full-check test
# Build API docs (no deps)
doc:
cargo doc --no-deps
# Build API docs and open in the browser
doc-open:
cargo doc --no-deps --open
# List dependencies with newer versions available (requires cargo-outdated)
outdated:
cargo outdated
# Check dependencies for known security advisories (requires cargo-audit)
audit:
cargo audit
# Install optional cargo tools used by other recipes (cargo-outdated, cargo-audit)
install-tools:
cargo install --locked cargo-outdated cargo-audit
# ---------------------------------------------------------------------------- #
# RELEASE #
# ---------------------------------------------------------------------------- #
# Releases are automated by release-plz in CI — merge the "chore: release" PR
# it opens on main. See RELEASE.md. The recipes below are local previews only.
# Generate changelog from conventional commits (local preview; CI regenerates it)
changelog:
git-cliff --output CHANGELOG.md
# Check for semver violations against the latest git tag
semver-check:
cargo semver-checks --baseline-rev "$(git describe --tags --abbrev=0)"
# ---------------------------------------------------------------------------- #
# QUALITY CHECK #
# ---------------------------------------------------------------------------- #
# Run checks with AI-powered auto-fix (dry-run by default; --execute to run)
quality-check *args:
bash scripts/quality_check.sh {{args}}
alias qc := quality-check
# ---------------------------------------------------------------------------- #
# TEMPLATE #
# ---------------------------------------------------------------------------- #
# Bring repo up to date with upstream template (dry-run by default; --execute to run, optional target dir)
bring-up-to-date *args:
bash scripts/bring_up_to_date.sh {{args}}
alias butd := bring-up-to-date
# Bring all projects in downstream.txt up to date in parallel (dry-run by default; --execute to run)
bring-up-to-date-all *args:
bash scripts/bring_up_to_date_all.sh {{args}}
alias butda := bring-up-to-date-all
# ---------------------------------------------------------------------------- #
# CARGO UPDATE #
# ---------------------------------------------------------------------------- #
# Update cargo dependencies, run checks, and open a PR (dry-run by default; --execute to run, optional target dir)
cargo-update *args:
bash scripts/cargo_update.sh {{args}}
alias cu := cargo-update
# Update cargo dependencies in all downstream projects in parallel (dry-run by default; --execute to run)
cargo-update-all *args:
bash scripts/cargo_update_all.sh {{args}}
alias cua := cargo-update-all
# ---------------------------------------------------------------------------- #
# TEMPLATE REVIEW #
# ---------------------------------------------------------------------------- #
# Review a downstream project for improvements to backport into the template (dry-run by default; --execute to run, optional target dir)
template-review *args:
bash scripts/template_review.sh {{args}}
alias tr := template-review
# Review all downstream projects in parallel for backport candidates (dry-run by default; --execute to run)
template-review-all *args:
bash scripts/template_review_all.sh {{args}}
alias tra := template-review-all
# ---------------------------------------------------------------------------- #
# TEMPLATE BACKPORT #
# ---------------------------------------------------------------------------- #
# Backport improvements from a downstream project into a fresh template clone and open a PR (dry-run by default; --execute to run)
template-backport *args:
bash scripts/template_backport.sh {{args}}
alias tb := template-backport
# Backport improvements from all downstream projects, one PR each (dry-run by default; --execute to run)
template-backport-all *args:
bash scripts/template_backport_all.sh {{args}}
alias tba := template-backport-all
# ---------------------------------------------------------------------------- #
# COUSINS #
# ---------------------------------------------------------------------------- #
# Review one cousin repo (by name from scripts/cousins.json) for template-sourced improvements (dry-run by default; --execute to run)
cousin-review *args:
bash scripts/cousin_review.sh {{args}}
alias cr := cousin-review
# Review every cousin in scripts/cousins.json in parallel (dry-run by default; --execute to run)
cousin-review-all *args:
bash scripts/cousin_review_all.sh {{args}}
alias cra := cousin-review-all
# Apply template-sourced changes to a cousin's opted-in paths and open a PR (dry-run by default; --execute to run)
cousin-apply *args:
bash scripts/cousin_apply.sh {{args}}
alias ca := cousin-apply
# Apply changes to every cousin, one PR each (dry-run by default; --execute to run)
cousin-apply-all *args:
bash scripts/cousin_apply_all.sh {{args}}
alias caa := cousin-apply-all