From 41b612da10ca7d12c26889a72f93c7cee72d5f43 Mon Sep 17 00:00:00 2001 From: Cee Chen Date: Tue, 9 Jan 2024 14:33:37 -0800 Subject: [PATCH] [devx] Update release script to not push up special release branches to remote --- scripts/release.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/release.js b/scripts/release.js index f07ae973e96..827f87c7828 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -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) {