Skip to content

Commit

Permalink
chore: updated auto-changelog configs
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed Dec 22, 2020
1 parent ebfad4c commit b09910b
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .auto-changelog
@@ -0,0 +1,7 @@
{
"handlebarsSetup": "./scripts/auto-changelog.js",
"ignoreCommitPattern": "^chore: release v",
"tagPattern": "^v(0|1|2)+\\.\\d+\\.\\d+$",
"unreleased": false,
"commitLimit": false
}
6 changes: 3 additions & 3 deletions .release-it.json
Expand Up @@ -3,11 +3,11 @@
"push": true,
"tagName": "v${version}",
"commitMessage": "chore: release v${version}",
"changelog": "auto-changelog --stdout --commit-limit false --ignore-commit-pattern \"^chore: release v\" --unreleased --template ./release-template.hbs --tag-pattern \"^v\\d+\\.\\d+\\.\\d+$\" --handlebars-setup ./scripts/auto-changelog.js"
"changelog": "auto-changelog --stdout --unreleased --template ./templates/changelog-template.hbs"
},
"github": {
"release": true,
"releaseNotes": "auto-changelog --stdout --commit-limit false --ignore-commit-pattern \"^chore: release v\" --unreleased --template ./release-template.hbs --tag-pattern \"^v\\d+\\.\\d+\\.\\d+$\" --handlebars-setup ./scripts/auto-changelog.js"
"releaseNotes": "auto-changelog --stdout --template ./templates/release-template.hbs"
},
"npm": {
"publish": false
Expand All @@ -18,6 +18,6 @@
}
},
"hooks": {
"after:bump": "auto-changelog -p --ignore-commit-pattern \"^chore: release v\" --template ./release-template.hbs --tag-pattern \"^v\\d+\\.\\d+\\.\\d+$\" --handlebars-setup ./scripts/auto-changelog.js"
"after:bump": "auto-changelog -p --template ./templates/changelog-template.hbs"
}
}
30 changes: 30 additions & 0 deletions templates/changelog-template.hbs
@@ -0,0 +1,30 @@
# Changelog

{{#each releases}}
{{#if href}}
## [{{title}}]({{href}}){{#if tag}} - {{isoDate}}{{/if}}
{{else}}
## {{title}}{{#if tag}} - {{isoDate}}{{/if}}
{{/if}}

{{#if summary}}
{{summary}}
{{/if}}

{{#custom merges commits heading="#### Features" subject="feat: "}}
- {{message}} ({{#if id}}[`#{{id}}`]{{else}}[{{shorthash}}]{{/if}}({{href}})).
{{/custom}}

{{#custom merges commits heading="#### Improvements" subject="(chore|refactor|style): "}}
- {{message}} ({{#if id}}[`#{{id}}`]{{else}}[{{shorthash}}]{{/if}}({{href}})).
{{/custom}}

{{#custom merges commits heading="#### Fixes" subject="fix: "}}
- {{message}} ({{#if id}}[`#{{id}}`]{{else}}[{{shorthash}}]{{/if}}({{href}})).
{{/custom}}

{{#custom merges commits heading="#### Documentations" subject="docs: "}}
- {{message}} ({{#if id}}[`#{{id}}`]{{else}}[{{shorthash}}]{{/if}}({{href}})).
{{/custom}}

{{/each}}
19 changes: 19 additions & 0 deletions templates/release-template.hbs
@@ -0,0 +1,19 @@
{{#each releases}}
{{#if @first}}
{{#custom merges commits heading="#### Features" subject="feat: "}}
- {{message}} ({{#if id}}[`#{{id}}`]{{else}}[{{shorthash}}]{{/if}}({{href}})).
{{/custom}}

{{#custom merges commits heading="#### Improvements" subject="(chore|refactor|style): "}}
- {{message}} ({{#if id}}[`#{{id}}`]{{else}}[{{shorthash}}]{{/if}}({{href}})).
{{/custom}}

{{#custom merges commits heading="#### Fixes" subject="fix: "}}
- {{message}} ({{#if id}}[`#{{id}}`]{{else}}[{{shorthash}}]{{/if}}({{href}})).
{{/custom}}

{{#custom merges commits heading="#### Documentations" subject="docs: "}}
- {{message}} ({{#if id}}[`#{{id}}`]{{else}}[{{shorthash}}]{{/if}}({{href}})).
{{/custom}}
{{/if}}
{{/each}}

0 comments on commit b09910b

Please sign in to comment.