From a8c402bb0e02c730974d5fc802ac29fe2e34296b Mon Sep 17 00:00:00 2001 From: "Thierno IB. BARRY" Date: Fri, 29 Jan 2021 00:30:05 +0100 Subject: [PATCH] docs: Update changelog generation to use custom sort with git-chglog v0.10.0 (#1202) --- .chglog/CHANGELOG.tpl.md | 8 ++++---- .chglog/config.yml | 10 +++++++++- Makefile | 4 ++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md index 01fa64d17a..1af11b8438 100644 --- a/.chglog/CHANGELOG.tpl.md +++ b/.chglog/CHANGELOG.tpl.md @@ -13,14 +13,14 @@ project adheres to [Semantic Versioning](http://semver.org/). {{ .Title }}: {{ range .Commits -}} {{- if .Subject -}} -- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject | upperFirst }} {{ end -}} {{ end }} {{ end -}} {{ else }} {{ range .Unreleased.Commits -}} {{- if .Subject -}} -- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject | upperFirst}} {{ end -}} {{ end }} {{ end -}} @@ -43,14 +43,14 @@ project adheres to [Semantic Versioning](http://semver.org/). {{ .Title }}: {{ range .Commits -}} {{- if .Subject -}} -- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject | upperFirst }} {{ end -}} {{ end }} {{ end -}} {{ else }} {{ range .Commits -}} {{- if .Subject -}} -- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject | upperFirst }} {{ end -}} {{ end }} {{ end -}} diff --git a/.chglog/config.yml b/.chglog/config.yml index 99485033c3..06f2cfb375 100644 --- a/.chglog/config.yml +++ b/.chglog/config.yml @@ -18,7 +18,15 @@ options: commit_groups: group_by: Type - sort_by: Type + sort_by: Custom + title_order: + - feat + - improvement + - refactor + - fix + - docs + - test + - ci title_maps: feat: FEATURES fix: BUG FIXES diff --git a/Makefile b/Makefile index 92c13f71f7..5120cc143a 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,10 @@ TAG_QUERY=v11.0.0.. scope ?= "minor" changelog-unrelease: - git-chglog -o $(CHANGELOG_FILE) $(TAG_QUERY) + git-chglog --no-case -o $(CHANGELOG_FILE) $(TAG_QUERY) changelog: - git-chglog -o $(CHANGELOG_FILE) --next-tag `$(SEMTAG) final -s $(scope) -o -f` $(TAG_QUERY) + git-chglog --no-case -o $(CHANGELOG_FILE) --next-tag `$(SEMTAG) final -s $(scope) -o -f` $(TAG_QUERY) release: $(SEMTAG) final -s $(scope)