diff --git a/devspaces-operator-bundle/build/scripts/sync.sh b/devspaces-operator-bundle/build/scripts/sync.sh index 647d49b89d..b6d44ce12d 100755 --- a/devspaces-operator-bundle/build/scripts/sync.sh +++ b/devspaces-operator-bundle/build/scripts/sync.sh @@ -207,8 +207,16 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 \\ EOT echo "Generated Dockerfile" -"${TARGETDIR}"/build/scripts/sync-che-operator.sh -v "${CSV_VERSION}" -s "${SOURCEDIR}/" -t "${TARGETDIR}/" -"${TARGETDIR}"/build/scripts/sync-che-olm.sh -v "${CSV_VERSION}" -p "${CSV_VERSION_PREV}" -s "${SOURCEDIR}/" -t "${TARGETDIR}/" +curl -sSL https://raw.githubusercontent.com/redhat-developer/devspaces/${MIDSTM_BRANCH}/product/getLatestImageTags.sh --output /tmp/getLatestImageTags.sh +if [[ $(cat /tmp/getLatestImageTags.sh) == *"404"* ]] || [[ $(cat /tmp/getLatestImageTags.sh) == *"Not Found"* ]]; then + echo "[ERROR] Could not load https://raw.githubusercontent.com/redhat-developer/devspaces/${MIDSTM_BRANCH}/product/getLatestImageTags.sh" + exit 1 +fi +chmod +x /tmp/getLatestImageTags.sh +UBI_TAG=$(/tmp/getLatestImageTags.sh -c ubi8/ubi-minimal --tag "8."); UBI_TAG=${UBI_TAG##*:} + +"${TARGETDIR}"/build/scripts/sync-che-operator.sh -v "${CSV_VERSION}" -s "${SOURCEDIR}/" -t "${TARGETDIR}/" --ubi-tag "${UBI_TAG}" +"${TARGETDIR}"/build/scripts/sync-che-olm.sh -v "${CSV_VERSION}" -p "${CSV_VERSION_PREV}" -s "${SOURCEDIR}/" -t "${TARGETDIR}/" --ubi-tag "${UBI_TAG}" pushd "${TARGETDIR}"/ >/dev/null || exit rm -fr api/ bundle/ config/ controllers/ hack/ mocks/ pkg/ vendor/ version/ go.* *.go diff --git a/devspaces-operator/build/scripts/sync.sh b/devspaces-operator/build/scripts/sync.sh index f8d9c48d24..783aa6004d 100755 --- a/devspaces-operator/build/scripts/sync.sh +++ b/devspaces-operator/build/scripts/sync.sh @@ -108,4 +108,12 @@ LABEL com.redhat.delivery.appregistry="false" \\ EOT echo "Converted Dockerfile" -"${TARGETDIR}"/build/scripts/sync-che-operator.sh -v "${CSV_VERSION}" -s "${SOURCEDIR}/" -t "${TARGETDIR}/" +curl -sSL https://raw.githubusercontent.com/redhat-developer/devspaces/${MIDSTM_BRANCH}/product/getLatestImageTags.sh --output /tmp/getLatestImageTags.sh +if [[ $(cat /tmp/getLatestImageTags.sh) == *"404"* ]] || [[ $(cat /tmp/getLatestImageTags.sh) == *"Not Found"* ]]; then + echo "[ERROR] Could not load https://raw.githubusercontent.com/redhat-developer/devspaces/${MIDSTM_BRANCH}/product/getLatestImageTags.sh" + exit 1 +fi +chmod +x /tmp/getLatestImageTags.sh +UBI_TAG=$(/tmp/getLatestImageTags.sh -c ubi8/ubi-minimal --tag "8."); UBI_TAG=${UBI_TAG##*:} + +"${TARGETDIR}"/build/scripts/sync-che-operator.sh -v "${CSV_VERSION}" -s "${SOURCEDIR}/" -t "${TARGETDIR}/" --ubi-tag "${UBI_TAG}"