From 81bfcdb36bcfca1402f403c997433903d7dbea38 Mon Sep 17 00:00:00 2001 From: Phil Date: Tue, 3 Oct 2023 15:08:21 +0200 Subject: [PATCH] Revert "Tag events: Always fetch branches" --- index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index ac818c9..8c02fff 100644 --- a/index.js +++ b/index.js @@ -205,8 +205,11 @@ const pkg = getPackageJson(); await runInWorkspace('git', ['commit', '-a', '-m', commitMessage.replace(/{{version}}/g, newVersion)]); } - // First fetch to get updated local version of branch - await runInWorkspace('git', ['fetch']); + // now go to the actual branch to perform the same versioning + if (isPullRequest) { + // First fetch to get updated local version of branch + await runInWorkspace('git', ['fetch']); + } await runInWorkspace('git', ['checkout', currentBranch]); await runInWorkspace('npm', ['version', '--allow-same-version=true', '--git-tag-version=false', current]); console.log('current 2:', current, '/', 'version:', version);