chore: improve generated changelog
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Robert Kaussow 2021-05-09 22:42:32 +02:00
parent b6a8262090
commit 4053a49c30
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
3 changed files with 16 additions and 4 deletions

View File

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

View File

@ -73,15 +73,22 @@ steps:
depends_on: depends_on:
- dryrun - dryrun
- name: changelog - name: changelog-generate
image: thegeeklab/git-chglog image: thegeeklab/git-chglog
commands: commands:
- git fetch -tq - 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} - git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
depends_on: depends_on:
- tags - tags
- name: changelog-format
image: thegeeklab/alpine-tools
commands:
- prettier CHANGELOG.md
- prettier -w CHANGELOG.md
depends_on:
- changelog-generate
- name: publish-dockerhub - name: publish-dockerhub
image: thegeeklab/drone-docker-buildx:20 image: thegeeklab/drone-docker-buildx:20
settings: settings:
@ -206,6 +213,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: 657e5b191f868dcd0863820de29c25538a4e1d0e3a1ff2db9ed182f9a27397a5 hmac: 58aa7a015f01db64179bcdd9e68502a89850eb785283d5e5afccbf828c22d8e2
... ...

View File

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