diff --git a/bump.hotfix.config.js b/bump.hotfix.config.js new file mode 100644 index 000000000..871b5e3a7 --- /dev/null +++ b/bump.hotfix.config.js @@ -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, +}) diff --git a/package.json b/package.json index 4467fa2ed..90288d0b8 100644 --- a/package.json +++ b/package.json @@ -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",