|
3 | 3 | # To re-generate a bundle for another specific version without changing the standard setup, you can: |
4 | 4 | # - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2) |
5 | 5 | # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) |
6 | | -VERSION ?= 0.0.9 |
| 6 | +VERSION ?= 0.0.11 |
7 | 7 |
|
8 | 8 | # CHANNELS define the bundle channels used in the bundle. |
9 | 9 | # Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") |
@@ -168,26 +168,29 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi |
168 | 168 |
|
169 | 169 | CONTROLLER_GEN = $(shell pwd)/bin/controller-gen |
170 | 170 | controller-gen: ## Download controller-gen locally if necessary. |
171 | | - $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0) |
| 171 | + $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen,v0.7.0) |
172 | 172 |
|
173 | 173 | KUSTOMIZE = $(shell pwd)/bin/kustomize |
174 | 174 | kustomize: ## Download kustomize locally if necessary. |
175 | | - $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3@v3.8.7) |
| 175 | + $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3,v3.10.0) |
176 | 176 |
|
177 | 177 | ENVTEST = $(shell pwd)/bin/setup-envtest |
178 | 178 | envtest: ## Download envtest-setup locally if necessary. |
179 | | - $(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest) |
| 179 | + $(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest,latest) |
180 | 180 |
|
181 | | -# go-get-tool will 'go get' any package $2 and install it to $1. |
| 181 | +# go-get-tool will 'go get' any package $2 in version $3 and install it to $1. |
182 | 182 | PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) |
183 | 183 | define go-get-tool |
184 | 184 | @[ -f $(1) ] || { \ |
185 | 185 | set -e ;\ |
186 | 186 | TMP_DIR=$$(mktemp -d) ;\ |
187 | 187 | cd $$TMP_DIR ;\ |
188 | 188 | go mod init tmp ;\ |
189 | | -echo "Downloading $(2)" ;\ |
190 | | -GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\ |
| 189 | +echo "Downloading $(2)@$(3)" ;\ |
| 190 | +GO_VERSION=`go version | { read _ _ v _; echo $${v#go}; }` ; \ |
| 191 | +GOBIN=$(PROJECT_DIR)/bin go get $(2)@$(3) ; \ |
| 192 | +echo "Go version is $$GO_VERSION" ; \ |
| 193 | +(printf '%s\n%s\n' "1.18" $$GO_VERSION | sort --check=quiet --version-sort) && GOBIN=$(PROJECT_DIR)/bin go install $(2) ; \ |
191 | 194 | rm -rf $$TMP_DIR ;\ |
192 | 195 | } |
193 | 196 | endef |
|
0 commit comments