Restore dry-run guard around the release build step

The picker staleness check added on this branch had replaced main's
dry-run branch, so `--dry-run` executed the real build. Keep the picker
hash check but only on a real run, matching main's dry-run contract.

AI-assisted (agent-implemented, maintainer-directed).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Abdul Wahab
2026-09-01 10:02:40 +05:00
co-authored by Cursor
parent 601a7a8755
commit b56ca30fcd
+16 -12
View File
@@ -131,19 +131,23 @@ ok('clean');
if (cfg.buildCmd) {
step(`Rebuilding outputs (${cfg.buildCmd})`);
const pickerOutput = component === 'skill'
? path.join(repoRoot, 'skill/scripts/picker')
: null;
const pickerHashBefore = pickerOutput ? directoryHash(pickerOutput) : null;
execSync(cfg.buildCmd, { cwd: repoRoot, stdio: 'inherit' });
if (pickerHashBefore && directoryHash(pickerOutput) !== pickerHashBefore) {
fail(`Picker build output was stale. Run \`bun run build:picker\`, then re-run the release check.`);
if (dryRun) {
console.log(` [dry-run] ${cfg.buildCmd}`);
} else {
const pickerOutput = component === 'skill'
? path.join(repoRoot, 'skill/scripts/picker')
: null;
const pickerHashBefore = pickerOutput ? directoryHash(pickerOutput) : null;
execSync(cfg.buildCmd, { cwd: repoRoot, stdio: 'inherit' });
if (pickerHashBefore && directoryHash(pickerOutput) !== pickerHashBefore) {
fail(`Picker build output was stale. Run \`bun run build:picker\`, then re-run the release check.`);
}
const postBuild = run('git status --porcelain');
if (postBuild) {
fail(`Build produced uncommitted changes. Run \`${cfg.buildCmd}\`, commit the result, then re-run.\n${postBuild}`);
}
ok('build outputs match source');
}
const postBuild = run('git status --porcelain');
if (postBuild) {
fail(`Build produced uncommitted changes. Run \`${cfg.buildCmd}\`, commit the result, then re-run.\n${postBuild}`);
}
ok('build outputs match source');
}
step('Checking HEAD is pushed to origin');