From c3473ca60e7e92f68cdff4e4a35bfcff2e7ae37b Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Wed, 16 Jul 2025 08:33:00 -0500 Subject: [PATCH] refactor(release-it): changes to the build process and changelog --- .release-it.json | 42 ++++++++++++++++++++++++++++++++++++++---- .versionrc.json | 17 ----------------- 2 files changed, 38 insertions(+), 21 deletions(-) delete mode 100644 .versionrc.json diff --git a/.release-it.json b/.release-it.json index 6e14ecd..0894325 100644 --- a/.release-it.json +++ b/.release-it.json @@ -9,19 +9,53 @@ "publish": false }, "hooks": { + "before:init": "node ./scripts/read-build-number.js", "after:release": "node ./scripts/create-gitea-release.js ${version}" }, "github": false, "plugins": { "@release-it/conventional-changelog": { - "preset": "conventionalcommits", + "preset": { + "name": "conventionalcommits", + "types": [ + { "type": "feat", "section": "🌟 Enhancements" }, + { "type": "fix", "section": "🐛 Bug fixes" }, + { "type": "chore", "section": "📝 Chore" }, + { "type": "docs", "section": "📚 Documentation" }, + { "type": "style", "section": "📚 Style" }, + { "type": "refactor", "section": "🛠️ Code Refactor" }, + { + "type": "perf", + + "section": "🚀 Performance" + }, + { "type": "test", "section": "📝 Testing Code" }, + { + "type": "ci", + + "section": "📈 Project changes" + }, + { + "type": "build", + "hidden": false, + "section": "📈 Project Builds" + } + ], + "commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commit/{{hash}}", + "compareUrlFormat": "{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}", + "issueUrlFormat": "{{host}}/{{owner}}/{{repository}}/issues/{{id}}", + "userUrlFormat": "{{host}}/{{user}}" + }, "infile": "CHANGELOG.md", - "config": ".versionrc.json" + "header": "# Changelog\n\nAll notable changes to LST will be documented in this file.\n", + "releaseCommitMessageFormat": "chore(release): {{currentTag}}" } }, - "gitea": { + "@release-it/gitea": { "host": "https://${GITEA_URL}", - "tokenRef": "GITEA_TOKEN" + "tokenRef": "GITEA_TOKEN", + "releaseName": "v${version} (build ${BUILD_NUMBER})", + "releaseNotes": "node ./scripts/get-changelog-entry.js ${version}" }, "files": ["package.json", "CHANGELOG.md"] diff --git a/.versionrc.json b/.versionrc.json deleted file mode 100644 index 0bf7272..0000000 --- a/.versionrc.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "types": [ - { "type": "feat", "section": "🌟 Enhancements" }, - { "type": "fix", "section": "🐛 Bug fixes" }, - { "type": "chore", "hidden": false, "section": "📝 Chore" }, - { "type": "docs", "section": "📚 Documentation" }, - { "type": "style", "hidden": true }, - { "type": "refactor", "section": "🛠️ Code Refactor" }, - { "type": "perf", "hidden": false, "section": "🚀 Performance" }, - { "type": "test", "section": "📝 Testing Code" }, - { "type": "ci", "hidden": false, "section": "📈 Project changes" }, - { "type": "build", "hidden": true, "section": "📈 Project Builds" } - ], - "commitUrlFormat": "https://git.tuffraid.net/cowch/logistics_support_tool/commits/{{hash}}", - "compareUrlFormat": "https://git.tuffraid.net/cowch/logistics_support_tool/compare/{{previousTag}}...{{currentTag}}", - "header": "# All changes to lst are shown below.\nReleases are combined zip of backend and frontend." -}