Releasing: Patching and Rollback (#8673)

This commit is contained in:
matt korwel
2025-09-17 21:16:08 -07:00
committed by GitHub
parent 8f0306f499
commit 930f39a0cd
14 changed files with 379 additions and 475 deletions

View File

@@ -82,12 +82,18 @@ async function main() {
if (dryRun) {
prBody += '\n\n**[DRY RUN]**';
}
run(
`gh pr create --base ${releaseBranch} --head ${hotfixBranch} --title "${prTitle}" --body "${prBody}"`,
dryRun,
);
const prCommand = `gh pr create --base ${releaseBranch} --head ${hotfixBranch} --title "${prTitle}" --body "${prBody}"`;
run(prCommand, dryRun);
console.log('Patch process completed successfully!');
if (dryRun) {
console.log('\n--- Dry Run Summary ---');
console.log(`Release Branch: ${releaseBranch}`);
console.log(`Hotfix Branch: ${hotfixBranch}`);
console.log(`Pull Request Command: ${prCommand}`);
console.log('---------------------');
}
}
function run(command, dryRun = false) {
@@ -116,8 +122,8 @@ function getLatestTag(channel) {
console.log(`Fetching latest tag for channel: ${channel}...`);
const pattern =
channel === 'stable'
? '\'(contains("nightly") or contains("preview")) | not\''
: '\'(contains("preview"))\'';
? '(contains("nightly") or contains("preview")) | not'
: '(contains("preview"))';
const command = `gh release list --limit 30 --json tagName | jq -r '[.[] | select(.tagName | ${pattern})] | .[0].tagName'`;
try {
return execSync(command).toString().trim();