mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
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:
+16
-12
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user