We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f713bd commit 25df077Copy full SHA for 25df077
scripts/release.ts
@@ -0,0 +1,25 @@
1
+import Git from 'simple-git'
2
+
3
+// NOTE: Makes sure that the release is going to the `release` branch for the possibility to easily redeploy from there.
4
5
+const git = Git()
6
7
+const hash = await git.revparse(['main'])
8
9
+console.log('Checkout release branch')
10
+await git.checkout('release')
11
12
+console.log(`Reset to main branch (${hash})`)
13
+await git.reset(['--hard', hash])
14
15
+console.log('Push to release branch')
16
+await git.push(['--force'])
17
18
+console.log('Checkout main branch')
19
+await git.checkout('main')
20
21
+console.log('Push Tags')
22
+await git.push(['--tags'])
23
24
+console.log('Push Main Branch')
25
+await git.push()
0 commit comments