From e030c15803c927bd41eb8bd7ba9a42d56f32bb89 Mon Sep 17 00:00:00 2001 From: Jarek Kowalski Date: Sun, 23 Jan 2022 16:58:33 -0800 Subject: [PATCH] fix(ci): generate changelog as part of the build (#1679) --- .chglog/CHANGELOG.tpl.md | 2 +- Makefile | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md index 0f05a4684..954ebf403 100755 --- a/.chglog/CHANGELOG.tpl.md +++ b/.chglog/CHANGELOG.tpl.md @@ -6,7 +6,7 @@ ### {{ .Title }} {{ range .Commits -}} -* {{ if eq .Type "fix" }}**Fix** {{ end }}{{ if eq .Type "feat" }}**Feature** {{ end }}{{ .Subject }} by {{ .Author.Name}} +* {{ if eq .Type "feat" }}**New Feature** {{ end }}{{ .Subject }} by {{ .Author.Name}} {{ end }} {{ end -}} diff --git a/Makefile b/Makefile index d94a8ff9f..0db05c354 100644 --- a/Makefile +++ b/Makefile @@ -156,6 +156,9 @@ ci-build: ifeq ($(GOARCH),amd64) $(retry) $(MAKE) kopia-ui endif +ifeq ($(GOOS)/$(GOARCH),linux/amd64) + $(MAKE) generate-change-log +endif ci-tests: lint vet test @@ -358,7 +361,7 @@ else $(gitchglog) $(CI_TAG) > dist/change_log.md endif -push-github-release: generate-change-log +push-github-release: ifneq ($(GH_RELEASE_REPO),) @echo Creating Github Release $(GH_RELEASE_NAME) in $(GH_RELEASE_REPO) with flags $(GH_RELEASE_FLAGS) gh --repo $(GH_RELEASE_REPO) release view $(GH_RELEASE_NAME) || gh --repo $(GH_RELEASE_REPO) release create -F dist/change_log.md $(GH_RELEASE_FLAGS) $(GH_RELEASE_NAME)