@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.
- package/core.mjs +8 -1
- 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
|
-
|
|
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