chore: improve generated changelog (#1)
continuous-integration/drone/push Build is passing Details

Co-authored-by: Robert Kaussow <mail@geeklabor.de>
Reviewed-on: #1
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
Co-committed-by: Robert Kaussow <xoxys@rknet.org>
This commit is contained in:
Robert Kaussow 2021-05-10 22:21:26 +02:00
parent c0d0282ead
commit 0aaf07547a
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

@ -86,14 +86,21 @@ local PipelineBuild = {
],
},
{
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-gitea',
image: 'plugins/gitea-release',

View File

@ -105,13 +105,18 @@ steps:
commands:
- cd dist/ && 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-gitea
image: plugins/gitea-release
settings:
@ -201,6 +206,6 @@ depends_on:
---
kind: signature
hmac: 324dc2e7454b73282e8fe95124742fbb10274ac11595f8bd9349a5c9108890f7
hmac: afaebf7248604450f06f77948cddd98029bc16f6435bcd29a37f132367659069
...

2
.prettierignore Normal file
View File

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