chore: improve generated changelog (#18)

This commit is contained in:
Robert Kaussow 2021-05-09 23:46:14 +02:00 committed by GitHub
parent 9ac4950d85
commit 7142c112ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 6 deletions

View File

@ -6,10 +6,14 @@
{{ range .CommitGroups -}}
### {{ .Title }}
{{ $subjects := list }}
{{ range .Commits -}}
{{ if not (has .Subject $subjects) -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ $subjects = append $subjects .Subject -}}
{{ end }}
{{ end -}}
{{- end }}
{{- end -}}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}

View File

@ -116,14 +116,21 @@ local PipelineBuildBinaries = {
],
},
{
name: 'changelog',
name: 'changelog-generate',
image: 'thegeeklab/git-chglog',
commands: [
'git fetch -tq',
'git-chglog --no-color --no-emoji ${DRONE_TAG:---next-tag unreleased unreleased}',
'git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}',
],
},
{
name: 'changelog-format',
image: 'thegeeklab/alpine-tools',
commands: [
'prettier CHANGELOG.md',
'prettier -w CHANGELOG.md',
],
},
{
name: 'publish',
image: 'plugins/github-release',

View File

@ -87,13 +87,18 @@ steps:
commands:
- cd release/ && sha256sum * > sha256sum.txt
- name: changelog
- name: changelog-generate
image: thegeeklab/git-chglog
commands:
- git fetch -tq
- git-chglog --no-color --no-emoji ${DRONE_TAG:---next-tag unreleased unreleased}
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
- name: changelog-format
image: thegeeklab/alpine-tools
commands:
- prettier CHANGELOG.md
- prettier -w CHANGELOG.md
- name: publish
image: plugins/github-release
settings:
@ -476,6 +481,6 @@ depends_on:
---
kind: signature
hmac: 1c7dc109e0955ae8d3e01358642eff449ceb23ce888d35dfed3206060af11db9
hmac: dfa81e368a04405794af929d2685d6d032a98a98811f8cedd6dc52fed745dc29
...

2
.prettierignore Normal file
View File

@ -0,0 +1,2 @@
.drone.yml
*.tpl.md