chore: hotfix script

This commit is contained in:
Innei 2024-10-23 17:28:33 +08:00
parent 1cd40dcde9
commit 8a2c4f526e
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
2 changed files with 17 additions and 0 deletions

16
bump.hotfix.config.js Normal file
View File

@ -0,0 +1,16 @@
/* eslint-disable no-template-curly-in-string */
import { execSync } from "node:child_process"
import { defineConfig } from "nbump"
const currentBranch = execSync("git rev-parse --abbrev-ref HEAD").toString().trim()
export default defineConfig({
before: ["git pull --rebase"],
after: [
`gh pr create --title 'chore: Hotfix to release v\${NEW_VERSION}' --body 'v\${NEW_VERSION}' --base main --head ${currentBranch}`,
],
commit_message: "chore(release): hotfix to release v${NEW_VERSION}",
tag: false,
changelog: true,
})

View File

@ -26,6 +26,7 @@
"format": "prettier --write .",
"format:check": "prettier --check .",
"generator:i18n-template": "tsx scripts/generate-i18n-locale.ts",
"hotfix": "vv -c bump.hotfix.config.js",
"lint": "eslint",
"lint:fix": "eslint --fix",
"polyfill-optimize": "pnpx nolyfill install",