Skip to content

Commit 4ac06a4

Browse files
committed
feat: Cleanup with restore
1 parent e2368f6 commit 4ac06a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/merge-release-run.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ async function run() {
185185
console.debug('version incrementType type:', incrementType);
186186
}
187187

188-
let currentVersion = execSync(`npm view ${pkg.name} version`, { cwd: srcPackageDir }).toString().trim();
188+
const currentVersion = execSync(`npm view ${pkg.name} version`, { cwd: srcPackageDir }).toString().trim();
189189

190190
setVersion(currentVersion, srcPackageDir);
191191
if (srcPackageDir !== deployDir) {
@@ -217,7 +217,7 @@ async function run() {
217217
if (disableGitTag) {
218218
console.log('Git tagging disabled... Skipping');
219219
} else {
220-
spawnSync(`git checkout ${path.join(deployDir, 'package.json')}`); // cleanup
220+
spawnSync('git restore .'); // Cleanup changes in the git workspace
221221
spawnSync(`git tag ${newVersion}`);
222222
spawnSync(`echo "version=${newVersion}" >> $GITHUB_OUTPUT`);
223223

0 commit comments

Comments
 (0)