Skip to content

Commit

Permalink
ci(release): support for releases from 8.x (#14028) (#14039)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0c92c81)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
mergify[bot] and v1v committed Sep 11, 2024
1 parent 9882183 commit 9cadccb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions release.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,16 @@ NEXT_RELEASE ?= $(RELEASE_BRANCH).$(shell expr $(PROJECT_PATCH_VERSION) + 1)

BRANCH_PATCH = update-$(NEXT_RELEASE)

# for the view commits
# as long as 8.x is the branch to run releases, then the base branch is 8.x
# when 8.x is not available the we should use main as the base branch.
CHANGELOG_BRANCH = 8.x

# BASE_BRANCH select by release type (default patch)
ifeq ($(RELEASE_TYPE),minor)
BASE_BRANCH ?= main
# as long as 8.x is the branch to run releases, then the base branch is 8.x
# when 8.x is not available the we should use main as the base branch.
BASE_BRANCH ?= 8.x
endif

ifeq ($(RELEASE_TYPE),patch)
Expand All @@ -64,7 +71,7 @@ define CHANGELOG_TMPL
[[release-notes-head]]
== APM version HEAD

https://github.com/elastic/apm-server/compare/$(RELEASE_BRANCH)\...main[View commits]
https://github.com/elastic/apm-server/compare/$(RELEASE_BRANCH)\...$(CHANGELOG_BRANCH)[View commits]

[float]
==== Breaking Changes
Expand Down Expand Up @@ -201,7 +208,7 @@ update-mergify:
echo ' - name: backport patches to $(VERSION) branch' >> .mergify.yml ; \
echo ' conditions:' >> .mergify.yml; \
echo ' - merged' >> .mergify.yml; \
echo ' - base=main' >> .mergify.yml; \
echo ' - base=8.x' >> .mergify.yml; \
echo ' - label=backport-$(VERSION)' >> .mergify.yml; \
echo ' actions:' >> .mergify.yml; \
echo ' backport:' >> .mergify.yml; \
Expand Down

0 comments on commit 9cadccb

Please sign in to comment.