From 88edf1106872479754e609851e466117944aebe4 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Sun, 3 Nov 2024 17:26:05 -0500 Subject: [PATCH] Create unique branch name [skip ci] (#266) --- scripts/release.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/release.js b/scripts/release.js index c2fb4176d7..02fd4c88d6 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -4,7 +4,9 @@ import { readFileSync } from 'fs' try { // Create a new branch with version-bump prefix console.log('Creating new branch...') - const branchName = `version-bump-${new Date().toISOString().split('T')[0]}` + 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/master`, { stdio: 'inherit' }) // Run npm version patch and capture the output