Skip to content

Commit 4f3c175

Browse files
committed
Add changelog generation script
1 parent 597baf1 commit 4f3c175

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

scripts/changelog-template.hbs

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{#each releases}}
2+
{{#if href}}
3+
## [{{title}}]({{href}}){{#if tag}} - {{isoDate}}{{/if}}
4+
{{else}}
5+
## {{title}}{{#if tag}} - {{isoDate}}{{/if}}
6+
{{/if}}
7+
8+
{{#if summary}}
9+
{{summary}}
10+
{{/if}}
11+
12+
{{#if merges}}
13+
### Merged
14+
15+
{{#each merges}}
16+
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{message}} {{#if href}}[`#{{id}}`]({{href}}){{/if}}
17+
{{/each}}
18+
{{/if}}
19+
20+
{{#if fixes}}
21+
### Fixed
22+
23+
{{#each fixes}}
24+
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.subject}}{{#each fixes}} {{#if href}}[`#{{id}}`]({{href}}){{/if}}{{/each}}
25+
{{/each}}
26+
{{/if}}
27+
28+
{{#commit-list commits heading='### Commits'}}
29+
- {{#if breaking}}**Breaking change:** {{/if}}{{subject}} {{#if href}}[`{{shorthash}}`]({{href}}){{/if}}
30+
{{/commit-list}}
31+
32+
{{/each}}

scripts/changelog.sh

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

0 commit comments

Comments
 (0)