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

View file

@ -1,5 +1,6 @@
{
"type": "module",
"version": "0.0.1",
"private": true,
"packageManager": "pnpm@7.9.0",
"license": "MIT",
@ -20,7 +21,8 @@
"test:unit": "vitest",
"test:typecheck": "vue-tsc --noEmit && vue-tsc --noEmit --project service-worker/tsconfig.json",
"test": "nr test:unit",
"postinstall": "nuxi prepare && simple-git-hooks"
"postinstall": "nuxi prepare && simple-git-hooks",
"release": "bumpp && esno scripts/release.ts"
},
"dependencies": {
"@fnando/sparkline": "^0.3.10",
@ -77,6 +79,7 @@
"@vitejs/plugin-vue": "^3.2.0",
"@vue-macros/nuxt": "^0.2.2",
"@vueuse/nuxt": "^9.9.0",
"bumpp": "^8.2.1",
"emoji-mart": "^5.4.0",
"eslint": "^8.30.0",
"esno": "^0.16.3",
@ -87,6 +90,7 @@
"postcss-nested": "^6.0.0",
"prettier": "^2.8.1",
"rollup-plugin-node-polyfills": "^0.2.1",
"simple-git": "^3.15.1",
"simple-git-hooks": "^2.8.1",
"std-env": "^3.3.1",
"theme-vitesse": "^0.6.0",

View file

@ -35,6 +35,7 @@ specifiers:
'@vueuse/nuxt': ^9.9.0
blurhash: ^2.0.4
browser-fs-access: ^0.31.1
bumpp: ^8.2.1
emoji-mart: ^5.4.0
eslint: ^8.30.0
esno: ^0.16.3
@ -55,6 +56,7 @@ specifiers:
rollup-plugin-node-polyfills: ^0.2.1
shiki: ^0.12.1
shiki-es: ^0.1.2
simple-git: ^3.15.1
simple-git-hooks: ^2.8.1
slimeform: ^0.8.0
std-env: ^3.3.1
@ -129,6 +131,7 @@ devDependencies:
'@vitejs/plugin-vue': 3.2.0
'@vue-macros/nuxt': 0.2.2_3nbxte3dhogb6b7pemmre2vo4m
'@vueuse/nuxt': 9.9.0_nuxt@3.0.0
bumpp: 8.2.1
emoji-mart: 5.4.0
eslint: 8.30.0
esno: 0.16.3
@ -139,6 +142,7 @@ devDependencies:
postcss-nested: 6.0.0
prettier: 2.8.1
rollup-plugin-node-polyfills: 0.2.1
simple-git: 3.15.1
simple-git-hooks: 2.8.1
std-env: 3.3.1
theme-vitesse: 0.6.0
@ -1811,6 +1815,28 @@ packages:
'@jridgewell/sourcemap-codec': 1.4.14
dev: true
/@jsdevtools/ez-spawn/3.0.4:
resolution: {integrity: sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==}
engines: {node: '>=10'}
dependencies:
call-me-maybe: 1.0.2
cross-spawn: 7.0.3
string-argv: 0.3.1
type-detect: 4.0.8
dev: true
/@kwsites/file-exists/1.1.1:
resolution: {integrity: sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==}
dependencies:
debug: 4.3.4
transitivePeerDependencies:
- supports-color
dev: true
/@kwsites/promise-deferred/1.1.1:
resolution: {integrity: sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==}
dev: true
/@mapbox/node-pre-gyp/1.0.10:
resolution: {integrity: sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==}
hasBin: true
@ -3996,6 +4022,19 @@ packages:
semver: 7.3.8
dev: true
/bumpp/8.2.1:
resolution: {integrity: sha512-4tHKsWC2mqHQvdjZ4AXgVhS2xMsz8qQ4zYt87vGRXW5tqAjrYa/UJqy7s/dGYI2OIe9ghBdiFhKpyKEX9SXffg==}
engines: {node: '>=10'}
hasBin: true
dependencies:
'@jsdevtools/ez-spawn': 3.0.4
cac: 6.7.14
fast-glob: 3.2.12
kleur: 4.1.5
prompts: 2.4.2
semver: 7.3.8
dev: true
/busboy/1.6.0:
resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==}
engines: {node: '>=10.16.0'}
@ -4028,6 +4067,10 @@ packages:
get-intrinsic: 1.1.3
dev: true
/call-me-maybe/1.0.2:
resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==}
dev: true
/callsites/3.1.0:
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
engines: {node: '>=6'}
@ -6713,6 +6756,16 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
/kleur/3.0.3:
resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==}
engines: {node: '>=6'}
dev: true
/kleur/4.1.5:
resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
engines: {node: '>=6'}
dev: true
/klona/2.0.5:
resolution: {integrity: sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ==}
engines: {node: '>= 8'}
@ -8215,6 +8268,14 @@ packages:
resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}
dev: true
/prompts/2.4.2:
resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==}
engines: {node: '>= 6'}
dependencies:
kleur: 3.0.3
sisteransi: 1.0.5
dev: true
/prosemirror-commands/1.4.0:
resolution: {integrity: sha512-/4jgtt0nF+RPis40MT81GA4HfqJzjjrGGwsYWICpE6A++2NT1wBqK9M4ROXHpriZaAXn5Uo1A7VbiMh7TNpgPg==}
dependencies:
@ -8778,6 +8839,16 @@ packages:
requiresBuild: true
dev: true
/simple-git/3.15.1:
resolution: {integrity: sha512-73MVa5984t/JP4JcQt0oZlKGr42ROYWC3BcUZfuHtT3IHKPspIvL0cZBnvPXF7LL3S/qVeVHVdYYmJ3LOTw4Rg==}
dependencies:
'@kwsites/file-exists': 1.1.1
'@kwsites/promise-deferred': 1.1.1
debug: 4.3.4
transitivePeerDependencies:
- supports-color
dev: true
/sirv/2.0.2:
resolution: {integrity: sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==}
engines: {node: '>= 10'}
@ -8787,6 +8858,10 @@ packages:
totalist: 3.0.0
dev: true
/sisteransi/1.0.5:
resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}
dev: true
/slash/3.0.0:
resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
engines: {node: '>=8'}

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')