From 2b0ac062dd6d305434d252b5da5ed718c801b106 Mon Sep 17 00:00:00 2001 From: Tayler Geiger Date: Fri, 24 Sep 2021 13:20:09 -0500 Subject: [PATCH] Add invocation of olm-create-bundle.sh to build-controller-release.sh (#207) Issue #, if available: 972 Description of changes: Adds `olm-create-bundle.sh` to the OLM conditional block of `build-controller-release.sh`. Also adds stripping the 'v' from `$BUNDLE_RELEASE` to prevent any breakage if the user has that variable including a 'v.' fixes aws-controllers-k8s/community#972 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --- scripts/build-controller-release.sh | 2 ++ scripts/olm-create-bundle.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/scripts/build-controller-release.sh b/scripts/build-controller-release.sh index a5e82171..d2669be0 100755 --- a/scripts/build-controller-release.sh +++ b/scripts/build-controller-release.sh @@ -252,4 +252,6 @@ if [[ $ACK_GENERATE_OLM == "true" ]]; then fi $ACK_GENERATE_BIN_PATH olm $ag_olm_args + $SCRIPTS_DIR/olm-create-bundle.sh "$SERVICE" "$olm_version" + fi diff --git a/scripts/olm-create-bundle.sh b/scripts/olm-create-bundle.sh index be70b11a..486a2f55 100755 --- a/scripts/olm-create-bundle.sh +++ b/scripts/olm-create-bundle.sh @@ -81,6 +81,7 @@ fi SERVICE=$(echo "$1" | tr '[:upper:]' '[:lower:]') VERSION=$2 BUNDLE_VERSION=${BUNDLE_VERSION:-$VERSION} +BUNDLE_VERSION=$(echo $BUNDLE_VERSION | tr -d "v") DEFAULT_SERVICE_CONTROLLER_SOURCE_PATH="$ROOT_DIR/../$SERVICE-controller" SERVICE_CONTROLLER_SOURCE_PATH=${SERVICE_CONTROLLER_SOURCE_PATH:-$DEFAULT_SERVICE_CONTROLLER_SOURCE_PATH}