* Checkout new branch on release script run

* 0.8.16

* nit
This commit is contained in:
Chenlei Hu
2024-11-03 16:26:07 -05:00
committed by GitHub
parent 1b110a62cf
commit 30642850cb
3 changed files with 8 additions and 3 deletions

View File

@@ -2,6 +2,11 @@ import { execSync } from 'child_process'
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]}`
execSync(`git checkout -b ${branchName} -t origin/master`, { stdio: 'inherit' })
// Run npm version patch and capture the output
console.log('Bumping version...')
execSync('npm version patch', { stdio: 'inherit' })