Repository navigation
Expand file tree
/
Copy pathJustfile
More file actions
124 lines (102 loc) · 3.63 KB
/
Copy pathJustfile
File metadata and controls
124 lines (102 loc) · 3.63 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
# SPDX-License-Identifier: MPL-2.0
# launch-scaffolder — justfile
default:
@just --list
# Build debug
build:
cargo build --locked --workspace
# Build release (optimised, stripped, single-file binary)
release:
cargo build --locked --workspace --release
# Run the binary with args
run *args:
cargo run --locked -p launch-scaffolder -- {{args}}
# Run all tests
test:
cargo test --locked --workspace
# Check all targets without changing the lockfile
check:
cargo check --locked --workspace --all-targets
# Clippy — strict
lint:
cargo clippy --locked --workspace --all-targets -- -D warnings
# Format
fmt:
cargo fmt --all
# Check formatting without writing
fmt-check:
cargo fmt --all -- --check
# Install the binary to ~/.cargo/bin
install:
cargo install --locked --path crates/launcher
# Uninstall
uninstall:
cargo uninstall launch-scaffolder
# Clean build artefacts
clean:
cargo clean
# Pre-commit check sequence
pre-commit: fmt-check check lint test
# Full local validation sequence
validate: fmt-check check lint test validate-standard
@echo "✓ validation passed"
# CI sequence
ci: validate
@echo "✓ CI passed"
# Print the baked-in launcher standard
standard:
cargo run --locked -p launch-scaffolder -- standard show
# Validate the launcher standard file
validate-standard:
cargo run --locked -p launch-scaffolder -- standard validate
# Smoke test: mint a launcher from the stapeln example into /tmp
smoke-mint:
cargo run --locked -p launch-scaffolder -- mint examples/stapeln.launcher.fixture.a2ml -o /tmp/stapeln-launcher.sh
@echo "Smoke test: mint produced /tmp/stapeln-launcher.sh"
# Mint a launcher in-place. Pass the path to an <app>.launcher.a2ml file.
# Example: just mint ../aerie/aerie.launcher.a2ml
mint config:
cargo run --locked --release -p launch-scaffolder -- mint {{config}}
# Re-mint every scaffolder-managed launcher found under ROOT (the directory
# holding your clones; nothing machine-specific is assumed). Each managed
# config must resolve to exactly one file: a missing or duplicated clone is
# an error naming the candidates, never a guess. Edit the list when
# adding/removing managed repos. Exceptions live in
# docs/launcher-exceptions-2026-04-10.adoc.
mint-all root:
#!/usr/bin/env bash
set -euo pipefail
BIN="./target/release/launch-scaffolder"
[ -d "{{root}}" ] || { echo "✗ {{root}} is not a directory" >&2; exit 2; }
[ -x "$BIN" ] || cargo build --locked --release
status=0 n=0
for rel in \
aerie/aerie.launcher.a2ml \
burble/burble.launcher.a2ml \
game-server-admin/game-server-admin.launcher.a2ml \
nqc/nqc.launcher.a2ml \
panll/panll.launcher.a2ml \
project-wharf/project-wharf.launcher.a2ml \
stapeln/stapeln.launcher.a2ml ; do
mapfile -d '' hits < <(find "{{root}}" -path '*/worktrees' -prune -o -path '*/archive' -prune \
-o -path "*/$rel" -type f -print0)
if [ "${#hits[@]}" -ne 1 ]; then
echo "✗ $rel: ${#hits[@]} matches under {{root}} (need exactly one)" >&2
for h in "${hits[@]}"; do echo " $h" >&2; done
status=1; continue
fi
if "$BIN" mint "${hits[0]}"; then
n=$((n + 1))
else
echo "✗ $rel: mint failed" >&2
status=1
fi
done
echo "Estate re-mint: $n of 7 launchers"
exit "$status"
# Generate cargo docs
doc:
cargo doc --locked --workspace --no-deps --open
secret-scan-trufflehog:
@command -v trufflehog >/dev/null || { echo "trufflehog is required for this scan" >&2; exit 127; }
trufflehog filesystem . --only-verified