chore: script for release

This commit is contained in:
Anthony Fu 2022-12-26 20:15:23 +01:00
parent 1bf60dc4a2
commit ee63bcb1b2
3 changed files with 97 additions and 1 deletions

17
scripts/release.ts Normal file
View 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')