From fe22e618a22c6097111da4f213c069f4bde4c8e0 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Tue, 13 Jan 2026 19:27:34 +0800 Subject: [PATCH] WIP --- extra/beta/update-version.js | 9 +++++++-- extra/release/beta.mjs | 3 --- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/extra/beta/update-version.js b/extra/beta/update-version.js index 7757b0f52..4b274e963 100644 --- a/extra/beta/update-version.js +++ b/extra/beta/update-version.js @@ -23,13 +23,13 @@ if (!exists) { // Also update package-lock.json const npm = /^win/.test(process.platform) ? "npm.cmd" : "npm"; - const resultVersion = childProcess.spawnSync(npm, ["--no-git-tag-version", "version", version], { shell: true }); + const resultVersion = childProcess.spawnSync(npm, ["--no-git-tag-version", "version", version]); if (resultVersion.error) { console.error(resultVersion.error); console.error("error npm version!"); process.exit(1); } - const resultInstall = childProcess.spawnSync(npm, ["install"], { shell: true }); + const resultInstall = childProcess.spawnSync(npm, ["install"]); if (resultInstall.error) { console.error(resultInstall.error); console.error("error update package-lock!"); @@ -57,6 +57,11 @@ function commit(version) { if (stdout.includes("no changes added to commit")) { throw new Error("commit error"); } + + // Git push the branch + childProcess.spawnSync("git", ["push", "origin"]); + stdout = res.stdout.toString().trim(); + console.log(stdout); } /** diff --git a/extra/release/beta.mjs b/extra/release/beta.mjs index e18ab2d06..d9f9b70bf 100644 --- a/extra/release/beta.mjs +++ b/extra/release/beta.mjs @@ -51,9 +51,6 @@ await checkTagExists(repoNames, version); // node extra/beta/update-version.js execSync("node ./extra/beta/update-version.js"); -// Git push the branch -spawnSync("git", ["push", "origin", branchName], { stdio: "inherit" }); - // Create Pull Request (gh pr create will handle pushing the branch) await createReleasePR(version, previousVersion, dryRun, branchName, githubRunId);