Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
Co-authored-by: Bartosz Majsak <[email protected]>
  • Loading branch information
cam-garrison and bartoszmajsak authored Jun 21, 2024
1 parent 245363a commit 253e500
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,24 +117,24 @@ image-push: ## Push container image
.PHONY: image
image: image-build image-push ## Build and push docker image with the manager.

.PHONY: update-manifests
update-manifests: ## Update image tags in manifests
sed -i 's/newTag: .*/newTag: $(VERSION)/' config/manager/kustomization.yaml
@echo "After update:"
@sed -n '/newTag:/p' config/manager/kustomization.yaml
##@ Release
define update-manifests
sed -i 's/newTag: .*/newTag: $(1)/' config/manager/kustomization.yaml
endef

.PHONY: release
release: ## Create a new release
@read -p "Enter new version (e.g., vX.Y.Z): " VERSION && \
$(MAKE) update-manifests VERSION=$$VERSION && \
$(call header,"Releasing version $(VERSION)")
@$(call update-manifests,$(VERSION)); \
git add config/ && \
git commit -m "release: $$VERSION" && \
git tag -a "$$VERSION" -m "Release $$VERSION" && \
$(MAKE) update-manifests VERSION="latest" && \
git commit -m "release: $(VERSION)" && \
git tag -a "$(VERSION)" -m "Release $(VERSION)"; \
$(call update-manifests,latest); \
git add config/ && \
git commit -m "release: next iteration"
@echo "Done, don't forget to push. When pushing, add --tags to your call."


##@ Deployment

ifndef ignore-not-found
Expand Down

0 comments on commit 253e500

Please sign in to comment.