1515# ======================================================================================================================
1616
1717# The version of the Operator being build - this should be a valid SemVer format
18- VERSION ?= 3.4.1
18+ VERSION ?= 3.4.2
1919MVN_VERSION ?= $(VERSION )
2020
2121# The version number to be replaced by this release
22- PREV_VERSION ?= 3.4.0
22+ PREV_VERSION ?= 3.4.1
23+ NEXT_VERSION := $(shell sh ./hack/next-version.sh "$(VERSION ) ")
2324
2425# The operator version to use to run certification tests against
2526CERTIFICATION_VERSION ?= $(VERSION )
2627
2728# The previous Operator version used to run the compatibility tests.
28- COMPATIBLE_VERSION ?= 3.4.0
29+ COMPATIBLE_VERSION ?= 3.4.1
2930# The selector to use to find Operator Pods of the COMPATIBLE_VERSION (do not put in double quotes!!)
3031COMPATIBLE_SELECTOR ?= control-plane=coherence
3132
@@ -61,7 +62,7 @@ TEST_COHERENCE_GID ?= com.oracle.coherence.ce
6162# The current working directory
6263CURRDIR := $(shell pwd)
6364
64- GH_TOKEN ?=
65+ GH_TOKEN ?=
6566ifeq ("$(GH_TOKEN ) ", "")
6667 GH_AUTH := 'Foo: Bar'
6768else
@@ -364,7 +365,7 @@ ISTIO_VERSION ?=
364365# ----------------------------------------------------------------------------------------------------------------------
365366# The version of Tanzu to install, leave empty for the latest
366367TANZU_VERSION ?=
367- TANZU =
368+ TANZU =
368369
369370# ======================================================================================================================
370371# Makefile targets start here
@@ -420,11 +421,15 @@ $(BUILD_PROPS):
420421# Clean-up all of the build artifacts
421422# ----------------------------------------------------------------------------------------------------------------------
422423.PHONY : clean
423- clean : # # Cleans the build
424+ clean : # # Cleans the build
424425 -rm -rf $(BUILD_OUTPUT ) || true
425426 -rm -rf $(BUILD_BIN ) || true
426427 -rm -rf bundle || true
428+ rm config/crd/bases/* .yaml || true
429+ rm -rf config/crd-small || true
427430 rm pkg/data/zz_generated_* .go || true
431+ rm pkg/data/assets/* .yaml || true
432+ rm pkg/data/assets/* .json || true
428433 ./mvnw -f java clean $(MAVEN_BUILD_OPTS )
429434 ./mvnw -f examples clean $(MAVEN_BUILD_OPTS )
430435
@@ -2074,7 +2079,7 @@ ifeq ($(OPERATOR_RELEASE_IMAGE), $(OPERATOR_IMAGE))
20742079 --amend $(OPERATOR_IMAGE)-amd64 \
20752080 --amend $(OPERATOR_IMAGE)-arm64
20762081 docker manifest annotate $(OPERATOR_IMAGE) $(OPERATOR_IMAGE)-arm64 --arch arm64
2077- docker manifest push $(OPERATOR_IMAGE)
2082+ docker manifest push $(OPERATOR_IMAGE)
20782083else
20792084 @echo "Tagging $(OPERATOR_IMAGE)-amd64 as $(OPERATOR_RELEASE_IMAGE)-amd64"
20802085 docker tag $(OPERATOR_IMAGE)-amd64 $(OPERATOR_RELEASE_IMAGE)-amd64
@@ -2354,6 +2359,10 @@ serve-docs:
23542359 cd $(BUILD_OUTPUT ) /docs; \
23552360 python -m SimpleHTTPServer 8080
23562361
2362+ # ======================================================================================================================
2363+ # Release targets
2364+ # ======================================================================================================================
2365+ # #@ Release Targets
23572366
23582367# ----------------------------------------------------------------------------------------------------------------------
23592368# Pre-Release Tasks
@@ -2373,23 +2382,6 @@ pre-release:
23732382.PHONY : post-release
23742383post-release : check-new-version new-version
23752384
2376- .PHONY : check-new-version
2377- check-new-version :
2378- ifeq (, $(NEW_VERSION ) )
2379- @echo "You must specify the NEW_VERSION parameter"
2380- exit 1
2381- else
2382- @echo "Updating version from $(VERSION) to $(NEW_VERSION)"
2383- endif
2384-
2385- .PHONY : new-version
2386- new-version :
2387- $(SED ) ' s/$(subst .,\.,$(PREV_VERSION))/$(VERSION)/g' MAKEFILE
2388- $(SED ) ' s/$(subst .,\.,$(VERSION))/$(NEW_VERSION)/g' MAKEFILE
2389- find config \( -name ' *.yaml' -o -name ' *.json' \) -exec $(SED ) ' s/$(subst .,\.,$(VERSION))/$(NEW_VERSION)/g' {} +
2390- find java \( -name ' pom.xml' \) -exec $(SED ) ' s/<version>$(subst .,\.,$(VERSION))<\/version>/<version>$(NEW_VERSION)<\/version>/g' {} +
2391-
2392-
23932385# ----------------------------------------------------------------------------------------------------------------------
23942386# Release the Coherence Operator dashboards
23952387# ----------------------------------------------------------------------------------------------------------------------
@@ -2498,14 +2490,50 @@ push-snapshot-docs: $(BUILD_TARGETS)/generate $(BUILD_TARGETS)/manifests docs
24982490# Release the Coherence Operator.
24992491# ----------------------------------------------------------------------------------------------------------------------
25002492.PHONY : release
2501- release :
2493+ release : # # Release the Operator
25022494ifeq (true, $(RELEASE_DRY_RUN ) )
25032495release : build-all-images release-ghpages
25042496 @echo " release dry-run: would have pushed images"
25052497else
25062498release : build-all-images push-release-images release-ghpages
25072499endif
25082500
2501+ # ----------------------------------------------------------------------------------------------------------------------
2502+ # Update the Operator version and all references to the previous version
2503+ # ----------------------------------------------------------------------------------------------------------------------
2504+ .PHONY : new-version
2505+ new-version : # # Update the Operator Version (must be run with NEXT_VERSION=x.y.z specified)
2506+ $(SED ) ' s/$(subst .,\.,$(VERSION))/$(NEXT_VERSION)/g' MAKEFILE
2507+ $(SED ) ' s/$(subst .,\.,$(PREV_VERSION))/$(VERSION)/g' MAKEFILE
2508+ find docs \( -name ' *.adoc' -o -name ' *.yaml' \) -exec $(SED ) ' s/$(subst .,\.,$(VERSION))/$(NEXT_VERSION)/g' {} +
2509+ find examples \( -name ' pom.xml' \) -exec $(SED ) ' s/<version>$(subst .,\.,$(VERSION))<\/version>/<version>$(NEXT_VERSION)<\/version>/g' {} +
2510+ find examples \( -name ' *.adoc' -o -name ' Dockerfile' \) -exec $(SED ) ' s/$(subst .,\.,$(VERSION))/$(NEXT_VERSION)/g' {} +
2511+ find examples \( -name ' *.yaml' -o -name ' *.json' \) -exec $(SED ) ' s/$(subst .,\.,$(VERSION))/$(NEXT_VERSION)/g' {} +
2512+ find config \( -name ' *.yaml' -o -name ' *.json' \) -exec $(SED ) ' s/$(subst .,\.,$(VERSION))/$(NEXT_VERSION)/g' {} +
2513+ find helm-charts \( -name ' *.yaml' -o -name ' *.json' \) -exec $(SED ) ' s/$(subst .,\.,$(VERSION))/$(NEXT_VERSION)/g' {} +
2514+ $(SED ) -e ' s/<revision>$(subst .,\.,$(VERSION))<\/revision>/<revision>$(NEXT_VERSION)<\/revision>/g' java/pom.xml
2515+
2516+ GIT_BRANCH ="version-update-$(VERSION ) "
2517+ GIT_LABEL ="version-update"
2518+
2519+ .PHONY : new-version-pr
2520+ new-version-pr : # # Create a PR to update the version
2521+ git config user.email
" [email protected] " 2522+ git config user.name " GitHub Action"
2523+ git checkout -b $(GIT_BRANCH )
2524+ git commit -am " Version update to $( VERSION) "
2525+ git push --set-upstream origin $(GIT_BRANCH )
2526+
2527+ gh label create "$(GIT_LABEL)" \
2528+ --description "Pull requests with version update" \
2529+ --force \
2530+ || true
2531+
2532+ gh pr create \
2533+ --title "Version update to $(VERSION)" \
2534+ --body "Current pull request contains version update to version $(VERSION)" \
2535+ --label "$(GIT_LABEL)" \
2536+ --head $(GIT_BRANCH)
25092537
25102538# ----------------------------------------------------------------------------------------------------------------------
25112539# Create the third-party license file
0 commit comments