chore: script for release
This commit is contained in:
parent
1bf60dc4a2
commit
ee63bcb1b2
3 changed files with 97 additions and 1 deletions
17
scripts/release.ts
Normal file
17
scripts/release.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import Git from 'simple-git'
|
||||
|
||||
const git = Git()
|
||||
|
||||
const hash = await git.revparse(['main'])
|
||||
|
||||
console.log('Checkout release branch')
|
||||
await git.checkout('release')
|
||||
|
||||
console.log(`Reset to main branch (${hash})`)
|
||||
await git.reset(['--hard', hash])
|
||||
|
||||
console.log('Push to release branch')
|
||||
await git.push(['--force'])
|
||||
|
||||
console.log('Checkout main branch')
|
||||
await git.checkout('main')
|
Loading…
Add table
Add a link
Reference in a new issue