Skip to content

Commit

Permalink
[devx] Update release script to not push up special release branches …
Browse files Browse the repository at this point in the history
…to remote
  • Loading branch information
cee-chen committed Jan 9, 2024
1 parent 01f5bd5 commit 41b612d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,15 @@ const hasStep = (step) => {
}

if (hasStep('tag') && !isDryRun) {
// push the version commit & tag to upstream, skipping prepush test hook
execSync(`git push upstream --follow-tags --no-verify`, execOptions);
// Skip prepush test hook on all pushes - we should have already tested previously,
// or we skipped the test step for a reason
if (isSpecialRelease) {
// Only push the tag, not the branch
execSync(`git push upstream v${versionTarget} --no-verify`, execOptions);
} else {
// Push commits as well as tag
execSync(`git push upstream --follow-tags --no-verify`, execOptions);
}
}

if (hasStep('publish') && !isDryRun) {
Expand Down

0 comments on commit 41b612d

Please sign in to comment.