@wipcomputer/wip-release 1.9.42 → 1.9.43

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.
Files changed (2) hide show
  1. package/core.mjs +8 -1
  2. package/package.json +1 -1
package/core.mjs CHANGED
@@ -135,7 +135,14 @@ function trashReleaseNotes(repoPath) {
135
135
  for (const f of files) {
136
136
  renameSync(join(repoPath, f), join(trashDir, f));
137
137
  execFileSync('git', ['add', join('_trash', f)], { cwd: repoPath, stdio: 'pipe' });
138
- execFileSync('git', ['rm', '--cached', f], { cwd: repoPath, stdio: 'pipe' });
138
+ // Only git rm if the file was tracked (committed or staged).
139
+ // Untracked scaffolded files from failed releases just need the rename.
140
+ try {
141
+ execFileSync('git', ['ls-files', '--error-unmatch', f], { cwd: repoPath, stdio: 'pipe' });
142
+ execFileSync('git', ['rm', '--cached', f], { cwd: repoPath, stdio: 'pipe' });
143
+ } catch {
144
+ // File wasn't tracked. Rename already moved it.
145
+ }
139
146
  }
140
147
  return files.length;
141
148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-release",
3
- "version": "1.9.42",
3
+ "version": "1.9.43",
4
4
  "type": "module",
5
5
  "description": "One-command release pipeline. Bumps version, updates changelog + SKILL.md, publishes to npm + GitHub.",
6
6
  "main": "core.mjs",