Skip to content

Commit

Permalink
Add changelog generation script
Browse files Browse the repository at this point in the history
  • Loading branch information
fieu committed Feb 5, 2023
1 parent 597baf1 commit 4f3c175
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
32 changes: 32 additions & 0 deletions scripts/changelog-template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{#each releases}}
{{#if href}}
## [{{title}}]({{href}}){{#if tag}} - {{isoDate}}{{/if}}
{{else}}
## {{title}}{{#if tag}} - {{isoDate}}{{/if}}
{{/if}}

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

{{#if merges}}
### Merged

{{#each merges}}
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{message}} {{#if href}}[`#{{id}}`]({{href}}){{/if}}
{{/each}}
{{/if}}

{{#if fixes}}
### Fixed

{{#each fixes}}
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.subject}}{{#each fixes}} {{#if href}}[`#{{id}}`]({{href}}){{/if}}{{/each}}
{{/each}}
{{/if}}

{{#commit-list commits heading='### Commits'}}
- {{#if breaking}}**Breaking change:** {{/if}}{{subject}} {{#if href}}[`{{shorthash}}`]({{href}}){{/if}}
{{/commit-list}}

{{/each}}
3 changes: 3 additions & 0 deletions scripts/changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
auto-changelog -t "$DIR/changelog-template.hbs" -l 999 --starting-version "$(git describe --abbrev=0)" --stdout --sort-commits date-desc --hide-credit

0 comments on commit 4f3c175

Please sign in to comment.