Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new branch in release script #1423

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' })
Expand Down
Loading