1
0
mirror of https://github.com/elk-zone/elk synced 2024-12-19 00:58:01 +09:00
elk/scripts/release.ts

18 lines
373 B
TypeScript
Raw Normal View History

2022-12-27 04:15:23 +09:00
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')