ship-app: --until <step> stages a cut (built, signed, verified locally; the deploy waits for the gate and the go)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-06 19:18:32 +00:00
parent 05a2d0599a
commit 8aa8f0a048

View file

@ -2,7 +2,7 @@
// Cuts an Igneum Miner app version from one command. the project lead, 4 October 2026: 0.3.1, 0.3.2 and 0.3.3 each took eight hand
// steps and an hour; this is the one step. packaging/README-ship.md has the short version.
//
// node tools/ship-app.mjs 0.3.4 --node <fork worktree> [--notes "..."] [--dry-run] [--from <step>]
// node tools/ship-app.mjs 0.3.4 --node <fork worktree> [--notes "..."] [--dry-run] [--from <step>] [--until <step>]
// [--skip-windows | --skip-mac] [--node-commit <sha>] [--win-release <dir>] [--mac-release <dir>]
// [--min-supported 0.3.0] [--activation-height N --deadline-note "..."] [--dl-both] [--public]
// node tools/ship-app.mjs --check the six version files agree (exit 1 when they do not)
@ -182,6 +182,7 @@ if (flags.check) {
const VERSION = pos[0];
if (!VERSION || !isVersion(VERSION)) { console.error('usage: node tools/ship-app.mjs <major.minor.patch> --node <fork worktree> [--notes "..."] [--dry-run] [--from <step>] [--skip-windows|--skip-mac] [--dl-both]\n node tools/ship-app.mjs --check | --self-test'); process.exit(2); }
if (!flags.node) { console.error('--node <fork worktree> is required (the igneum-node worktree the node and miner were built from)'); process.exit(2); }
if (flags.until && !STEPS.includes(flags.until)) { console.error(`--until must be one of: ${STEPS.join(', ')}`); process.exit(2); }
if (flags.from && !STEPS.includes(flags.from)) { console.error(`--from must be one of: ${STEPS.join(', ')}`); process.exit(2); }
if (flags['skip-windows'] && flags['skip-mac']) { console.error('--skip-windows and --skip-mac together leave nothing to ship'); process.exit(2); }
const DRY = !!flags['dry-run'];
@ -606,7 +607,14 @@ const IMPL = { preflight, bump, inputs, commit, ci, fetch: fetchStep, dmg, copy,
async function main() {
const start = flags.from ? STEPS.indexOf(flags.from) : 0;
// preflight always runs: it is reads only and the later steps need its facts (fork commit, state)
const todo = start === 0 ? STEPS : ['preflight', ...STEPS.slice(start)];
let todo = start === 0 ? STEPS : ['preflight', ...STEPS.slice(start)];
// --until <step>: stage a cut (6 October 2026, 0.3.15: everything built, signed and verified locally, nothing deployed
// until the gate's PASS and the project lead's go); the run ends after that step and says what it left for the resume
if (flags.until) {
if (!STEPS.includes(flags.until)) { console.error(`--until must be one of: ${STEPS.join(', ')}`); process.exit(2); }
const cut = todo.indexOf(flags.until);
if (cut >= 0) { const left = todo.slice(cut + 1); todo = todo.slice(0, cut + 1); say(`staging: the run stops after ${flags.until}; left for the resume (--from ${left[0] || '-'}): ${left.join(', ') || 'nothing'}`); }
}
if (start > 0) say(`resuming from ${flags.from} (state ${STATE_FILE})`);
const t0 = Date.now();
let failed = null;