You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal was duplicate with similar (but not same) logic - eliminated.
The implementation was silently picking operator-sdk when on PATH - must be provided through OPERATOR_SDK now.
Element of least astonishment.
Conditional Makefile logic removed leveraging native make features.
Signed-off-by: Oliver Gondža <[email protected]>
@@ -215,27 +203,17 @@ docker-push: ## Push docker image with the manager.
215
203
216
204
##@ Build Dependencies
217
205
218
-
## Location to install dependencies to
219
-
LOCALBIN ?= $(shell pwd)/bin
220
-
$(LOCALBIN):
221
-
mkdir -p $(LOCALBIN)
206
+
# Do not use OPERATOR_SDK variable not to overwrite the user provided path
207
+
bin/operator-sdk:
208
+
mkdir -p bin
209
+
curl -sSLo bin/operator-sdk \
210
+
https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$(shell go env GOOS)_$(shell go env GOARCH)
211
+
chmod +x bin/operator-sdk
222
212
213
+
# Install to bin/operator-sdk unless already there or explicit OPERATOR_SDK provided
223
214
.PHONY: operator-sdk
224
-
OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk
225
-
operator-sdk: ## Download operator-sdk locally if necessary.
226
-
ifeq (,$(wildcard$(OPERATOR_SDK)))
227
-
ifeq (,$(shell which operator-sdk 2>/dev/null))
228
-
@{ \
229
-
set -e ;\
230
-
mkdir -p $(dir $(OPERATOR_SDK)) ;\
231
-
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
0 commit comments