From 09d5e29f0173723b0150af454606d6985c7db710 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Mon, 4 Nov 2024 09:02:33 -0500 Subject: [PATCH] Create new branch in release script (#1423) --- scripts/release.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/release.js b/scripts/release.js index 0358eb218..04f6595c5 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -2,6 +2,13 @@ import { execSync } from 'child_process' import { readFileSync } from 'fs' try { + // Create a new branch with version-bump prefix + console.log('Creating new branch...') + const date = new Date().toISOString().split('T')[0] + const timestamp = new Date().getTime() + const branchName = `version-bump-${date}-${timestamp}` + execSync(`git checkout -b ${branchName} -t origin/main`, { stdio: 'inherit' }) + // Run npm version patch and capture the output console.log('Bumping version...') execSync('npm version patch', { stdio: 'inherit' })