From 67866849626b34795c39f1cbb41eb5b70f61d3df Mon Sep 17 00:00:00 2001 From: Richie Foreman Date: Fri, 17 Oct 2025 15:02:44 -0400 Subject: [PATCH] fix(release): Update create-patch-pr.js to take a package name (#11400) --- scripts/releasing/create-patch-pr.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/releasing/create-patch-pr.js b/scripts/releasing/create-patch-pr.js index 767cee7fa9..2fc63e5631 100644 --- a/scripts/releasing/create-patch-pr.js +++ b/scripts/releasing/create-patch-pr.js @@ -30,6 +30,12 @@ async function main() { choices: ['stable', 'preview'], demandOption: true, }) + .option('cli-package-name', { + description: + 'fully qualified package name with scope (e.g @google/gemini-cli)', + string: true, + default: '@google/gemini-cli', + }) .option('dry-run', { description: 'Whether to run in dry-run mode.', type: 'boolean', @@ -48,7 +54,7 @@ async function main() { run('git fetch --all --tags --prune', dryRun); - const releaseInfo = getLatestReleaseInfo(channel); + const releaseInfo = getLatestReleaseInfo({ argv, channel }); const latestTag = releaseInfo.currentTag; const nextVersion = releaseInfo.nextVersion; @@ -267,10 +273,10 @@ function branchExists(branchName) { } } -function getLatestReleaseInfo(channel) { +function getLatestReleaseInfo({ argv, channel } = {}) { console.log(`Fetching latest release info for channel: ${channel}...`); const patchFrom = channel; // 'stable' or 'preview' - const command = `node scripts/get-release-version.js --type=patch --patch-from=${patchFrom}`; + const command = `node scripts/get-release-version.js --cli-package-name="${argv['cli-package-name']}" --type=patch --patch-from=${patchFrom}`; try { const result = JSON.parse(execSync(command).toString().trim()); console.log(`Current ${channel} tag: ${result.previousReleaseTag}`);