@wipcomputer/wip-release 1.9.64 → 1.9.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core.mjs +18 -1
- package/package.json +1 -1
package/core.mjs
CHANGED
|
@@ -1184,7 +1184,24 @@ export async function release({ repoPath, level, notes, notesSource, dryRun, noP
|
|
|
1184
1184
|
console.log(` ✗ Release notes blocked:`);
|
|
1185
1185
|
for (const issue of notesCheck.issues) console.log(` - ${issue}`);
|
|
1186
1186
|
console.log('');
|
|
1187
|
-
//
|
|
1187
|
+
// Only scaffold on feature branches. On main, scaffolding leaves an
|
|
1188
|
+
// untracked file that branch guards prevent removing (#223).
|
|
1189
|
+
let currentBranch = '';
|
|
1190
|
+
try {
|
|
1191
|
+
currentBranch = execFileSync('git', ['branch', '--show-current'], {
|
|
1192
|
+
cwd: repoPath, encoding: 'utf8'
|
|
1193
|
+
}).trim();
|
|
1194
|
+
} catch {}
|
|
1195
|
+
|
|
1196
|
+
const isProtectedBranch = currentBranch === 'main' || currentBranch === 'master';
|
|
1197
|
+
|
|
1198
|
+
if (isProtectedBranch) {
|
|
1199
|
+
console.log(` Release notes missing. Write RELEASE-NOTES-v${newVersion.replace(/\./g, '-')}.md on your feature branch before merging.`);
|
|
1200
|
+
console.log('');
|
|
1201
|
+
return { currentVersion, newVersion, dryRun: false, failed: true };
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
// Feature branch: scaffold a template so the agent has something to fill in
|
|
1188
1205
|
const templatePath = scaffoldReleaseNotes(repoPath, newVersion);
|
|
1189
1206
|
console.log(` Scaffolded template: ${basename(templatePath)}`);
|
|
1190
1207
|
console.log(' Fill it in, commit, then run wip-release again.');
|
package/package.json
CHANGED