diff --git a/changelog/Makefile b/changelog/Makefile index 9f88b59c9cb9..d7cd67bdace3 100644 --- a/changelog/Makefile +++ b/changelog/Makefile @@ -48,13 +48,13 @@ 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 . \ --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,13 +63,13 @@ 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; \ 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 . \ @@ -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"