From 2bc5185240c033b3f259488a1d0d24ecad775185 Mon Sep 17 00:00:00 2001 From: N Balachandran Date: Mon, 25 Jul 2022 10:09:38 +0530 Subject: [PATCH] fix: use downloaded operator-sdk This commit updates the Makefile to use the downloaded operator-sdk so as to use a fixed version on every system. It also updates the operator-sdk version. Signed-off-by: N Balachandran --- Makefile | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 7bba0b3c5..3f2674cf3 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) VERSION ?= 0.0.1 +OPERATOR_SDK_VERSION ?= 1.21.0 + # CHANNELS define the bundle channels used in the bundle. # Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") # To re-generate a bundle for other specific channels without changing the standard setup, you can: @@ -268,20 +270,12 @@ endif .PHONY: operator-sdk OPERATOR_SDK = ./bin/operator-sdk -operator-sdk: ## Download operator-sdk locally if necessary. -ifeq (,$(wildcard $(OPERATOR_SDK))) -ifeq (,$(shell which operator-sdk 2>/dev/null)) - @{ \ +operator-sdk: ## Download operator-sdk locally set -e ;\ mkdir -p $(dir $(OPERATOR_SDK)) ;\ OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \ - curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/v1.14.0/operator-sdk_$${OS}_$${ARCH};\ + curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/v${OPERATOR_SDK_VERSION}/operator-sdk_$${OS}_$${ARCH};\ chmod +x $(OPERATOR_SDK) ;\ - } -else -OPERATOR_SDK = $(shell which operator-sdk) -endif -endif # A comma-separated list of bundle images (e.g. make catalog-build BUNDLE_IMGS=example.com/operator-bundle:v0.1.0,example.com/operator-bundle:v0.2.0). # These images MUST exist in a registry and be pull-able.