Skip to content

Commit b76918e

Browse files
committed
fix: resolve unbound variable error
Signed-off-by: Michael Edgar <[email protected]>
1 parent 33e627d commit b76918e

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

operator/bin/common.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
#!/bin/bash
22

3-
# Operator naming
4-
OPERATOR_NAME="streamshub-console-operator"
5-
OPERATOR_INSTANCE_NAME="${OPERATOR_NAME}-v${VERSION}"
6-
OPERATOR_CSV_NAME="${OPERATOR_NAME}.v${VERSION}"
7-
83
YQ="$(which yq 2>/dev/null)" || :
94

105
if [ "${YQ}" == "" ] ; then
@@ -18,3 +13,6 @@ if [ "${SKOPEO}" == "" ] ; then
1813
echo "'skopeo' is not installed, please visit https://github.com/containers/skopeo/blob/main/install.md for more info"
1914
exit 1
2015
fi
16+
17+
# Operator naming
18+
OPERATOR_NAME="streamshub-console-operator"

operator/bin/modify-bundle-metadata.sh

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ fi
2727

2828
source ${SCRIPT_PATH}/common.sh
2929

30+
OPERATOR_INSTANCE_NAME="${OPERATOR_NAME}-v${VERSION}"
31+
OPERATOR_CSV_NAME="${OPERATOR_NAME}.v${VERSION}"
32+
3033
BUNDLE_PATH=${SCRIPT_PATH}/../target/bundle/streamshub-console-operator/
3134
CSV_FILE_PATH=${BUNDLE_PATH}/manifests/streamshub-console-operator.clusterserviceversion.yaml
3235

operator/bin/version-check.sh

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ OPERATOR_PATH="$(cd -- "${SCRIPT_PATH}/.." >/dev/null 2>&1 ; pwd -P)"
88
VERSION="${1?version is required}"
99

1010
source ${SCRIPT_PATH}/common.sh
11+
OPERATOR_CSV_NAME="${OPERATOR_NAME}.v${VERSION}"
1112
ALPHA_CHANNEL=${OPERATOR_PATH}/src/main/olm/channel.alpha.yaml
1213

1314
if [ "$(${YQ} '(.entries[].name | select(. == "'${OPERATOR_CSV_NAME}'"))' ${ALPHA_CHANNEL})" != "" ] ; then

0 commit comments

Comments
 (0)