Skip to content

Commit

Permalink
feat: Cleanup with restore
Browse files Browse the repository at this point in the history
  • Loading branch information
glitch452 committed Apr 17, 2024
1 parent e2368f6 commit 4ac06a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/merge-release-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async function run() {
console.debug('version incrementType type:', incrementType);
}

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

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

Expand Down

0 comments on commit 4ac06a4

Please sign in to comment.