From d6a6d1c444803dad5f6c5f65a710203f9adfe914 Mon Sep 17 00:00:00 2001 From: Juri Leino Date: Mon, 22 Apr 2024 14:22:42 +0200 Subject: [PATCH 1/4] chore(devDeps): remove @semantic-release/github This plugin is already loaded with semantic-release package. --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 3c37ee442..e8d4e4630 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,6 @@ "devDependencies": { "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.0", - "@semantic-release/github": "^9.2.1", "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", "conventional-changelog-conventionalcommits": "^7.0.2", From f395517751d083f50af9029244208f68e9e02f1a Mon Sep 17 00:00:00 2001 From: Juri Leino Date: Mon, 22 Apr 2024 16:18:16 +0200 Subject: [PATCH 2/4] ci: add conventionalcommits.config.cjs This configuration is then passed to both commit analysis and changelog generation phases of the automated release process. The only change to the headerPattern is the question mark after the colon. This will effectively match the first word in the header as the type of the commit. --- .releaserc | 5 +++-- commit-parser-options.js | 7 ------- commitlint.config.cjs | 6 +++--- conventionalcommits.config.cjs | 3 +++ 4 files changed, 9 insertions(+), 12 deletions(-) delete mode 100644 commit-parser-options.js create mode 100644 conventionalcommits.config.cjs diff --git a/.releaserc b/.releaserc index 59e6ccba2..2cddc75ba 100644 --- a/.releaserc +++ b/.releaserc @@ -3,13 +3,14 @@ "plugins": [ ["@semantic-release/commit-analyzer", { "preset": "conventionalcommits", - "parserOpts": "./commit-parser-options.js", + "presetConfig": "./conventionalcommits.config.cjs", "releaseRules": [ { "type": "!(fix|feat|build|chore|ci|docs|style|refactor|perf|test)", "release": "patch" } ] }], ["@semantic-release/release-notes-generator", { - "preset": "conventionalcommits" + "preset": "conventionalcommits", + "presetConfig": "./conventionalcommits.config.cjs" }], ["@semantic-release/exec", { "prepareCmd": "ant -Dapp.version=${nextRelease.version}" diff --git a/commit-parser-options.js b/commit-parser-options.js deleted file mode 100644 index 37fec6b6c..000000000 --- a/commit-parser-options.js +++ /dev/null @@ -1,7 +0,0 @@ -// Change default header pattern matcher to match headers with no colon. -// This will make the first __word__ in free-form commit message headers the __type__. -// With this non-empty type we can do a negated match (the type being anything but -// one of the other keywords with associated release rules). -module.exports = { - "headerPattern": /^(\w*)(?:\(([\w\$\.\-\* ]*)\))?\:? (.*)$/ -}; \ No newline at end of file diff --git a/commitlint.config.cjs b/commitlint.config.cjs index a3155c136..6016db312 100644 --- a/commitlint.config.cjs +++ b/commitlint.config.cjs @@ -1,8 +1,8 @@ module.exports = { - extends: ['@commitlint/config-conventional'], + extends: ['@commitlint/config-conventional'], rules: { - 'body-max-line-length': [1, 'always', 200], + 'body-max-line-length': [1, 'always', 200], 'type-empty': [1, 'never'], 'subject-empty': [1, 'never'] - } + } } \ No newline at end of file diff --git a/conventionalcommits.config.cjs b/conventionalcommits.config.cjs new file mode 100644 index 000000000..58ae6ce00 --- /dev/null +++ b/conventionalcommits.config.cjs @@ -0,0 +1,3 @@ +module.exports = { + headerPattern: /^(\w*)(?:\(([\w\$\.\-\* ]*)\))?\:? (.*)$/ +} \ No newline at end of file From 96f3152ea992d81bbbc96bc81051bbf99341a591 Mon Sep 17 00:00:00 2001 From: Juri Leino Date: Mon, 22 Apr 2024 16:19:06 +0200 Subject: [PATCH 3/4] fix(ci): limit the characters in gitsha.xml to 7 Otherwise tuttle is not able to find the changeset for incremental updates. --- build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 2385cdaab..03f685548 100644 --- a/build.xml +++ b/build.xml @@ -71,7 +71,7 @@ - + From ceb9c3b790b22eb847169108abe253e9aa2b3c44 Mon Sep 17 00:00:00 2001 From: Juri Leino Date: Mon, 22 Apr 2024 18:33:43 +0200 Subject: [PATCH 4/4] ci: minor changes to release rules --- .releaserc | 5 ++--- conventionalcommits.config.cjs | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.releaserc b/.releaserc index 2cddc75ba..054ab2b0c 100644 --- a/.releaserc +++ b/.releaserc @@ -9,8 +9,7 @@ ] }], ["@semantic-release/release-notes-generator", { - "preset": "conventionalcommits", - "presetConfig": "./conventionalcommits.config.cjs" + "preset": "conventionalcommits" }], ["@semantic-release/exec", { "prepareCmd": "ant -Dapp.version=${nextRelease.version}" @@ -29,4 +28,4 @@ ] }] ] -} \ No newline at end of file +} diff --git a/conventionalcommits.config.cjs b/conventionalcommits.config.cjs index 58ae6ce00..f834edaff 100644 --- a/conventionalcommits.config.cjs +++ b/conventionalcommits.config.cjs @@ -1,3 +1,7 @@ +// Change default header pattern matcher to match headers with no colon. +// This will make the first __word__ in free-form commit message headers the __type__. +// With this non-empty type we can do a negated match (the type being anything but +// one of the other keywords with associated release rules). module.exports = { headerPattern: /^(\w*)(?:\(([\w\$\.\-\* ]*)\))?\:? (.*)$/ -} \ No newline at end of file +}