mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-25 02:36:21 +03:00
17 lines
373 B
TypeScript
17 lines
373 B
TypeScript
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')
|