@@ -131,6 +131,10 @@ docker-build: ## Build docker image with the manager.
131131docker-push : # # Push docker image with the manager.
132132 $(CONTAINER_TOOL ) push ${IMG}
133133
134+ .PHONY : goreleaser-build-local
135+ goreleaser-build-local : goreleaser # # Run goreleaser build locally. Use to validate the goreleaser configuration.
136+ $(GORELEASER ) build --snapshot --clean --single-target --verbose
137+
134138# PLATFORMS defines the target platforms for the manager image be built to provide support to multiple
135139# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
136140# - be able to use docker buildx. More info: https://docs.docker.com/build/buildx/
@@ -154,6 +158,10 @@ build-installer: manifests generate kustomize ## Generate a consolidated YAML wi
154158 # cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
155159 $(KUSTOMIZE ) build config/default > dist/install.yaml
156160
161+ .PHONY : manifests-release
162+ manifests-release : generate manifests kustomize # # Generate the consolidated install.yaml with the release tag.
163+ ./hack/manifests-release.sh $(KUSTOMIZE ) $(IMAGE_TAG )
164+
157165# #@ Deployment
158166
159167ifndef ignore-not-found
@@ -193,6 +201,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION)
193201MOCKERY = $(LOCALBIN ) /mockery-$(MOCKERY_VERSION )
194202NILAWAY = $(LOCALBIN ) /nilaway-$(NILAWAY_VERSION )
195203GINKGO = $(LOCALBIN ) /ginkgo-$(GINKGO_VERSION )
204+ GORELEASER ?= $(LOCALBIN ) /goreleaser-$(GORELEASER_VERSION )
196205
197206# # Tool Versions
198207KUSTOMIZE_VERSION ?= v5.3.0
@@ -202,6 +211,7 @@ GOLANGCI_LINT_VERSION ?= v1.62.0
202211MOCKERY_VERSION ?= v2.42.2
203212NILAWAY_VERSION ?= latest
204213GINKGO_VERSION =$(shell go list -m all | grep github.com/onsi/ginkgo/v2 | awk '{print $$2}')
214+ GORELEASER_VERSION ?= v2.4.8
205215.PHONY : kustomize
206216kustomize : $(KUSTOMIZE ) # # Download kustomize locally if necessary.
207217$(KUSTOMIZE ) : $(LOCALBIN )
@@ -238,6 +248,11 @@ nilaway:
238248ginkgo :
239249 $(call go-install-tool,$(GINKGO ) ,github.com/onsi/ginkgo/v2/ginkgo,${GINKGO_VERSION})
240250
251+ .PHONY : goreleaser
252+ goreleaser : $(GORELEASER )
253+ $(GORELEASER ) : $(LOCALBIN )
254+ $(call go-install-tool,$(GORELEASER ) ,github.com/goreleaser/goreleaser/v2,$(GORELEASER_VERSION ) )
255+
241256# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
242257# $1 - target path with name of binary (ideally with version)
243258# $2 - package url which can be installed
0 commit comments