From 5f1be12ad87130784f31590123306bdb85355134 Mon Sep 17 00:00:00 2001 From: Zachary Hu Date: Mon, 26 Feb 2024 12:45:00 +0800 Subject: [PATCH 1/3] chore(release): unify changelog PR reference links --- changelog/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog/Makefile b/changelog/Makefile index 9f88b59c9cb..8909616bcd6 100644 --- a/changelog/Makefile +++ b/changelog/Makefile @@ -54,7 +54,7 @@ generate: --repo-path . \ --changelog-paths $(VERSION)/kong,$(UNRELEASED_DIR)/kong \ --title Kong \ - --github-issue-repo Kong/kong \ + --github-issue-repo $(OWNER_REPO) \ --github-api-repo $(OWNER_REPO) \ --with-jiras \ >> $(VERSION).md; \ @@ -63,7 +63,7 @@ generate: --repo-path . \ --changelog-paths $(UNRELEASED_DIR)/kong \ --title Kong \ - --github-issue-repo Kong/kong \ + --github-issue-repo $(OWNER_REPO) \ --github-api-repo $(OWNER_REPO) \ --with-jiras \ >> $(VERSION).md; \ From 424472e6ed2e92c4a9cfe8e64cea2c505c15b73a Mon Sep 17 00:00:00 2001 From: Zachary Hu Date: Mon, 26 Feb 2024 15:58:02 +0800 Subject: [PATCH 2/3] chore(release): do not generate changelogs if there is no yml file in the changelog directory --- changelog/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog/Makefile b/changelog/Makefile index 8909616bcd6..82c447373eb 100644 --- a/changelog/Makefile +++ b/changelog/Makefile @@ -48,7 +48,7 @@ generate: @rm -f $(VERSION).md @touch $(VERSION).md - @if [ -d "$(UNRELEASED_DIR)/kong" ]; then \ + @if [ -d "$(UNRELEASED_DIR)/kong" ] && [ -n "$$(shopt -s nullglob; echo $(UNRELEASED_DIR)/kong/*.yml)" ] ; then \ if [ -f "$(VERSION)/$(VERSION).md" ]; then \ changelog --debug=$(DEBUG) generate \ --repo-path . \ @@ -69,7 +69,7 @@ generate: >> $(VERSION).md; \ fi \ fi - @if [ -d "$(UNRELEASED_DIR)/kong-manager" ]; then \ + @if [ -d "$(UNRELEASED_DIR)/kong-manager" ] && [ -n "$$(shopt -s nullglob; echo $(UNRELEASED_DIR)/kong-manager/*.yml)" ] ; then \ if [ -f "$(VERSION)/$(VERSION).md" ]; then \ changelog --debug=$(DEBUG) generate \ --repo-path . \ From ffca4d3def77243a7cb2a368fe0ffb17fba9b375 Mon Sep 17 00:00:00 2001 From: Zachary Hu Date: Mon, 26 Feb 2024 15:58:28 +0800 Subject: [PATCH 3/3] chore(release): add .gitkeep to empty changelog dir when generating the changelog PR --- changelog/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog/Makefile b/changelog/Makefile index 82c447373eb..d7cd67bdace 100644 --- a/changelog/Makefile +++ b/changelog/Makefile @@ -102,6 +102,7 @@ push_changelog: mkdir -p $(VERSION)/$$i ; \ git mv -k $(UNRELEASED_DIR)/$$i/*.yml $(VERSION)/$$i/ ; \ touch $(UNRELEASED_DIR)/$$i/.gitkeep ; \ + touch $(VERSION)/$$i/.gitkeep ; \ done @git add . @git commit -m "docs(release): genereate $(VERSION) changelog"