From 000b7c916bc054fe27206ae4cffba087916c320a Mon Sep 17 00:00:00 2001 From: Malay Kumar Parida Date: Wed, 27 Sep 2023 05:39:08 +0530 Subject: [PATCH] Remove unnecessary declaration of variables twice as default & actual Signed-off-by: Malay Kumar Parida --- hack/common.sh | 41 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/hack/common.sh b/hack/common.sh index 2a6d2e386e..220a538c79 100644 --- a/hack/common.sh +++ b/hack/common.sh @@ -9,9 +9,7 @@ GOHOSTOS="$(go env GOHOSTOS)" GOHOSTARCH="$(go env GOHOSTARCH)" # Current DEV version of the CSV -DEFAULT_CSV_VERSION="4.14.0" -CSV_VERSION="${CSV_VERSION:-${DEFAULT_CSV_VERSION}}" -VERSION="${VERSION:-${CSV_VERSION}}" +CSV_VERSION="${CSV_VERSION:-4.14.0}" LDFLAGS="-X github.com/red-hat-storage/ocs-operator/v4/version.Version=${CSV_VERSION}" # Tools & binaries versions and locations @@ -49,31 +47,18 @@ LATEST_ROOK_CSIADDONS_IMAGE="quay.io/csiaddons/k8s-sidecar:v0.6.0" # TODO: change image once the quay repo is changed LATEST_MUST_GATHER_IMAGE="quay.io/ocs-dev/ocs-must-gather:latest" -DEFAULT_IMAGE_REGISTRY="quay.io" -DEFAULT_REGISTRY_NAMESPACE="ocs-dev" -DEFAULT_IMAGE_TAG="latest" -DEFAULT_OPERATOR_IMAGE_NAME="ocs-operator" -DEFAULT_OPERATOR_BUNDLE_NAME="ocs-operator-bundle" -DEFAULT_FILE_BASED_CATALOG_NAME="ocs-operator-catalog" -DEFAULT_METRICS_EXPORTER_IMAGE_NAME="ocs-metrics-exporter" - -IMAGE_REGISTRY="${IMAGE_REGISTRY:-${DEFAULT_IMAGE_REGISTRY}}" -REGISTRY_NAMESPACE="${REGISTRY_NAMESPACE:-${DEFAULT_REGISTRY_NAMESPACE}}" -OPERATOR_IMAGE_NAME="${OPERATOR_IMAGE_NAME:-${DEFAULT_OPERATOR_IMAGE_NAME}}" -OPERATOR_BUNDLE_NAME="${OPERATOR_BUNDLE_NAME:-${DEFAULT_OPERATOR_BUNDLE_NAME}}" -FILE_BASED_CATALOG_NAME="${FILE_BASED_CATALOG_NAME:-${DEFAULT_FILE_BASED_CATALOG_NAME}}" -METRICS_EXPORTER_IMAGE_NAME="${METRICS_EXPORTER_IMAGE_NAME:-${DEFAULT_METRICS_EXPORTER_IMAGE_NAME}}" -IMAGE_TAG="${IMAGE_TAG:-${DEFAULT_IMAGE_TAG}}" - -DEFAULT_OPERATOR_FULL_IMAGE_NAME="${IMAGE_REGISTRY}/${REGISTRY_NAMESPACE}/${OPERATOR_IMAGE_NAME}:${IMAGE_TAG}" -DEFAULT_BUNDLE_FULL_IMAGE_NAME="${IMAGE_REGISTRY}/${REGISTRY_NAMESPACE}/${OPERATOR_BUNDLE_NAME}:${IMAGE_TAG}" -DEFAULT_FILE_BASED_CATALOG_FULL_IMAGE_NAME="${IMAGE_REGISTRY}/${REGISTRY_NAMESPACE}/${FILE_BASED_CATALOG_NAME}:${IMAGE_TAG}" -DEFAULT_METRICS_EXPORTER_FULL_IMAGE_NAME="${IMAGE_REGISTRY}/${REGISTRY_NAMESPACE}/${METRICS_EXPORTER_IMAGE_NAME}:${IMAGE_TAG}" - -OPERATOR_FULL_IMAGE_NAME="${OPERATOR_FULL_IMAGE_NAME:-${DEFAULT_OPERATOR_FULL_IMAGE_NAME}}" -BUNDLE_FULL_IMAGE_NAME="${BUNDLE_FULL_IMAGE_NAME:-${DEFAULT_BUNDLE_FULL_IMAGE_NAME}}" -FILE_BASED_CATALOG_FULL_IMAGE_NAME="${FILE_BASED_CATALOG_FULL_IMAGE_NAME:-${DEFAULT_FILE_BASED_CATALOG_FULL_IMAGE_NAME}}" -METRICS_EXPORTER_FULL_IMAGE_NAME="${METRICS_EXPORTER_FULL_IMAGE_NAME:-${DEFAULT_METRICS_EXPORTER_FULL_IMAGE_NAME}}" +IMAGE_REGISTRY="quay.io" +REGISTRY_NAMESPACE="ocs-dev" +IMAGE_TAG="latest" +OPERATOR_IMAGE_NAME="ocs-operator" +OPERATOR_BUNDLE_NAME="ocs-operator-bundle" +FILE_BASED_CATALOG_NAME="ocs-operator-catalog" +METRICS_EXPORTER_IMAGE_NAME="ocs-metrics-exporter" + +OPERATOR_FULL_IMAGE_NAME="${IMAGE_REGISTRY}/${REGISTRY_NAMESPACE}/${OPERATOR_IMAGE_NAME}:${IMAGE_TAG}" +BUNDLE_FULL_IMAGE_NAME="${IMAGE_REGISTRY}/${REGISTRY_NAMESPACE}/${OPERATOR_BUNDLE_NAME}:${IMAGE_TAG}" +FILE_BASED_CATALOG_FULL_IMAGE_NAME="${IMAGE_REGISTRY}/${REGISTRY_NAMESPACE}/${FILE_BASED_CATALOG_NAME}:${IMAGE_TAG}" +METRICS_EXPORTER_FULL_IMAGE_NAME="${IMAGE_REGISTRY}/${REGISTRY_NAMESPACE}/${METRICS_EXPORTER_IMAGE_NAME}:${IMAGE_TAG}" NOOBAA_BUNDLE_FULL_IMAGE_NAME="quay.io/noobaa/noobaa-operator-bundle:master-20230718"