Skip to content

Commit

Permalink
chore(release): simplify changelog automation (#12762)
Browse files Browse the repository at this point in the history
  • Loading branch information
outsinre authored Mar 21, 2024
1 parent 3ca6385 commit ed0b96d
Showing 1 changed file with 21 additions and 41 deletions.
62 changes: 21 additions & 41 deletions changelog/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,55 +40,35 @@ check_version:
fi

create_branch:
@git fetch
@git fetch --prune
@git submodule update --init --recursive
@git checkout -B $(BRANCH_NAME) $(ORIGIN_BRANCH)

generate:
@rm -f $(VERSION).md
@touch $(VERSION).md

@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 $(OWNER_REPO) \
--github-api-repo $(OWNER_REPO) \
--with-jiras \
>> $(VERSION).md; \
else \
changelog --debug=$(DEBUG) generate \
--repo-path . \
--changelog-paths $(UNRELEASED_DIR)/kong \
--title Kong \
--github-issue-repo $(OWNER_REPO) \
--github-api-repo $(OWNER_REPO) \
--with-jiras \
>> $(VERSION).md; \
fi \
@if [ -n "$$(shopt -s nullglob; echo $(UNRELEASED_DIR)/kong/*.yml)" ] || \
[ -n "$$(shopt -s nullglob; echo $(VERSION)/kong/*.yml)" ] ; then \
changelog --debug=$(DEBUG) generate \
--repo-path . \
--changelog-paths $(VERSION)/kong,$(UNRELEASED_DIR)/kong \
--title Kong \
--github-issue-repo $(OWNER_REPO) \
--github-api-repo $(OWNER_REPO) \
--with-jiras \
>> $(VERSION).md; \
fi
@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 . \
--changelog-paths $(VERSION)/kong-manager,$(UNRELEASED_DIR)/kong-manager \
--title Kong-Manager \
--github-issue-repo Kong/kong-manager \
--github-api-repo $(OWNER_REPO) \
--with-jiras \
>> $(VERSION).md; \
else \
changelog --debug=$(DEBUG) generate \
--repo-path . \
--changelog-paths $(UNRELEASED_DIR)/kong-manager \
--title Kong-Manager \
--github-issue-repo Kong/kong-manager \
--github-api-repo $(OWNER_REPO) \
--with-jiras \
>> $(VERSION).md; \
fi \
@if [ -n "$$(shopt -s nullglob; echo $(UNRELEASED_DIR)/kong-manager/*.yml)" ] || \
[ -n "$$(shopt -s nullglob; echo $(VERSION)/kong-manager/*.yml)" ] ; then \
changelog --debug=$(DEBUG) generate \
--repo-path . \
--changelog-paths $(VERSION)/kong-manager,$(UNRELEASED_DIR)/kong-manager \
--title Kong-Manager \
--github-issue-repo Kong/kong-manager \
--github-api-repo $(OWNER_REPO) \
--with-jiras \
>> $(VERSION).md; \
fi

@echo
Expand Down

1 comment on commit ed0b96d

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:ed0b96de49da824d76122cbaf7fc15060405afe5
Artifacts available https://github.com/Kong/kong/actions/runs/8368914538

Please sign in to comment.