Fix nightly stable version. (#443)

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
pull/444/head
Oleksandr Andriienko 2020-09-14 07:22:02 -04:00 committed by GitHub
parent e01f6d2e65
commit da3193065c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 7 deletions

View File

@ -7,13 +7,13 @@ metadata:
categories: Developer Tools
certified: "false"
containerImage: quay.io/eclipse/che-operator:nightly
createdAt: "2020-09-09T06:56:23Z"
createdAt: "2020-09-14T08:38:35Z"
description: A Kube-native development solution that delivers portable and collaborative
developer workspaces.
operatorframework.io/suggested-namespace: eclipse-che
repository: https://github.com/eclipse/che-operator
support: Eclipse Foundation
name: eclipse-che-preview-kubernetes.v7.18.0-0.nightly
name: eclipse-che-preview-kubernetes.v7.19.0-1.nightly
namespace: placeholder
spec:
apiservicedefinitions: {}
@ -353,4 +353,4 @@ spec:
maturity: stable
provider:
name: Eclipse Foundation
version: 7.18.0-0.nightly
version: 7.19.0-1.nightly

View File

@ -7,13 +7,13 @@ metadata:
categories: Developer Tools
certified: "false"
containerImage: quay.io/eclipse/che-operator:nightly
createdAt: "2020-09-09T06:56:23Z"
createdAt: "2020-09-14T08:38:35Z"
description: A Kube-native development solution that delivers portable and collaborative
developer workspaces.
operatorframework.io/suggested-namespace: eclipse-che
repository: https://github.com/eclipse/che-operator
support: Eclipse Foundation
name: eclipse-che-preview-openshift.v7.18.0-0.nightly
name: eclipse-che-preview-openshift.v7.19.0-1.nightly
namespace: placeholder
spec:
apiservicedefinitions: {}
@ -400,4 +400,4 @@ spec:
maturity: stable
provider:
name: Eclipse Foundation
version: 7.18.0-0.nightly
version: 7.19.0-1.nightly

View File

@ -37,7 +37,9 @@ incrementNightlyVersion() {
CLUSTER_SERVICE_VERSION=$(yq -r ".channels[] | select(.name == \"stable\") | .currentCSV" "${PACKAGE_FILE_PATH}")
STABLE_PACKAGE_VERSION=$(echo "${CLUSTER_SERVICE_VERSION}" | sed -e "s/${PACKAGE_NAME}.v//")
newVersion="${STABLE_PACKAGE_VERSION}-$((incrementPart+1)).nightly"
parseStableVersion
STABLE_MINOR_VERSION=$((STABLE_MINOR_VERSION+1))
newVersion="${STABLE_MAJOR_VERSION}.${STABLE_MINOR_VERSION}.0-$((incrementPart+1)).nightly"
echo "[INFO] Set up nightly ${platform} version: ${newVersion}"
yq -rY "(.spec.version) = \"${newVersion}\" | (.metadata.name) = \"eclipse-che-preview-${platform}.v${newVersion}\"" "${CSV}" > "${CSV}.old"
@ -56,3 +58,12 @@ getNightlyVersionIncrementPart() {
echo "${incrementPart}"
}
parseStableVersion() {
local majorAndMinor=${STABLE_PACKAGE_VERSION%.*}
STABLE_MINOR_VERSION=${majorAndMinor#*.}
STABLE_MAJOR_VERSION=${majorAndMinor%.*}
export STABLE_MAJOR_VERSION
export STABLE_MINOR_VERSION
}