From 32a8efbe9cdc49b4e9868d71ee5ff58869214774 Mon Sep 17 00:00:00 2001 From: Flavius Lacatusu Date: Mon, 20 Sep 2021 15:15:50 +0200 Subject: [PATCH] fixes after review Signed-off-by: Flavius Lacatusu --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0214ea274..d6ee7e65e 100644 --- a/Makefile +++ b/Makefile @@ -470,6 +470,11 @@ bundle: generate manifests kustomize ## Generate bundle manifests and metadata, exit 1 fi + if [ -z "$(channel)" ]; then + echo "[INFO] You must specify 'channel' macros. For example: `make bundle platform=kubernetes channel=next`" + exit 1 + fi + if [ -z "$(NO_INCREMENT)" ]; then $(MAKE) increment-next-version platform="$${platform}" fi @@ -661,7 +666,7 @@ bundle: generate manifests kustomize ## Generate bundle manifests and metadata, yq -Yi '.spec.installModes[] |= if .type=="SingleNamespace" then .supported |= false else . end' "$${NEW_CSV}" yq -Yi '.spec.installModes[] |= if .type=="MultiNamespace" then .supported |= false else . end' "$${NEW_CSV}" yq -Yi '.spec.installModes[] |= if .type=="AllNamespaces" then .supported |= true else . end' "$${NEW_CSV}" - sed -ri 's|operatorframework.io/suggested-namespace: eclipse-che|operatorframework.io/suggested-namespace: openshift-operators|' "$${NEW_CSV}" + yq -rYi '.metadata.annotations["operatorframework.io/suggested-namespace"] |= "openshift-operators"' "$${NEW_CSV}" # Enable by default devWorkspace engine in `next-all-namespaces` channel CSV_CR_SAMPLES=$$(yq -r ".metadata.annotations[\"alm-examples\"] | \ @@ -720,6 +725,12 @@ increment-next-version: exit 1 fi + if [ -z "$(channel)" ]; then + echo "[INFO] You must specify 'channel' macros. For example: `make bundle platform=kubernetes channel=next`" + exit 1 + fi + + NEXT_BUNDLE_PATH=$$($(MAKE) getBundlePath platform="$(platform)" channel="$(channel)" -s) OPM_BUNDLE_MANIFESTS_DIR="$${NEXT_BUNDLE_PATH}/manifests" CSV="$${OPM_BUNDLE_MANIFESTS_DIR}/che-operator.clusterserviceversion.yaml"