Skip to content

Commit

Permalink
ci(patch-release): use current version (#12445)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Jan 17, 2024
1 parent e05455d commit 03aa27d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions release.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ RELEASE_BRANCH ?= $(PROJECT_MAJOR_VERSION).$(PROJECT_MINOR_VERSION)
NEXT_PROJECT_MINOR_VERSION ?= $(PROJECT_MAJOR_VERSION).$(shell expr $(PROJECT_MINOR_VERSION) + 1).0
NEXT_RELEASE ?= $(RELEASE_BRANCH).$(shell expr $(PROJECT_PATCH_VERSION) + 1)

BRANCH_PATCH = update-$(NEXT_RELEASE)

# BASE_BRANCH select by release type (default patch)
ifeq ($(RELEASE_TYPE),minor)
BASE_BRANCH ?= main
Expand Down Expand Up @@ -119,13 +121,13 @@ minor-release:
.PHONY: patch-release
patch-release:
@echo "INFO: Create feature branch and update the versions. Target branch $(RELEASE_BRANCH)"
$(MAKE) create-branch NAME=update-$(NEXT_RELEASE) BASE=$(RELEASE_BRANCH)
$(MAKE) create-branch NAME=$(BRANCH_PATCH) BASE=$(RELEASE_BRANCH)
$(MAKE) update-version VERSION=$(RELEASE_VERSION)
$(MAKE) update-version-makefile VERSION=$(PROJECT_MAJOR_VERSION)\.$(PROJECT_MINOR_VERSION)
$(MAKE) update-version-legacy VERSION=$(NEXT_RELEASE) PREVIOUS_VERSION=$(CURRENT_RELEASE)
$(MAKE) create-commit COMMIT_MESSAGE="docs: update docs versions to $(NEXT_RELEASE)"
$(MAKE) create-commit COMMIT_MESSAGE="docs: update docs versions to $(RELEASE_VERSION)"
@echo "INFO: Push changes to $(PROJECT_OWNER)/apm-server and create the relevant Pull Requests"
$(MAKE) create-pull-request BRANCH=update-$(NEXT_RELEASE) TARGET_BRANCH=$(RELEASE_BRANCH) TITLE="$(NEXT_RELEASE): update docs" BODY="Merge before the final Release build."
$(MAKE) create-pull-request BRANCH=$(BRANCH_PATCH) TARGET_BRANCH=$(RELEASE_BRANCH) TITLE="$(RELEASE_VERSION): update docs" BODY="Merge before the final Release build."

############################################
## Internal make goals to bump versions
Expand Down

0 comments on commit 03aa27d

Please sign in to comment.