diff --git a/scripts/package-image b/scripts/package-image index 69f3369ffe..5acece1f0d 100755 --- a/scripts/package-image +++ b/scripts/package-image @@ -5,7 +5,7 @@ cd $(dirname $0)/.. . ./scripts/version.sh -TAG=${TAG:-${VERSION}${SUFFIX}} +TAG=${TAG:-${VERSION_TAG}${SUFFIX}} REPO=${REPO:-rancher} IMAGE_NAME=${IMAGE_NAME:-k3s} diff --git a/scripts/sonobuoy-e2e-tests b/scripts/sonobuoy-e2e-tests index 78eece8820..0f544eaf11 100755 --- a/scripts/sonobuoy-e2e-tests +++ b/scripts/sonobuoy-e2e-tests @@ -5,7 +5,7 @@ cd $(dirname $0)/.. if [ -z "$K3S_IMAGE" ]; then . ./scripts/version.sh - TAG=${TAG:-${VERSION}${SUFFIX}} + TAG=${TAG:-${VERSION_TAG}${SUFFIX}} REPO=${REPO:-rancher} IMAGE_NAME=${IMAGE_NAME:-k3s} export K3S_IMAGE=${REPO}/${IMAGE_NAME}:${TAG} diff --git a/scripts/version.sh b/scripts/version.sh index c5c814207c..614ebc8ee6 100755 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -30,5 +30,6 @@ VERSION_CNIPLUGINS="v0.7.6-k3s1" if [[ -n "$GIT_TAG" ]]; then VERSION=$GIT_TAG else - VERSION="$(sed -e 's/[-+].*//' <<< "$VERSION_K8S")+$COMMIT$DIRTY" + VERSION="$(sed -e 's/[-+].*//' <<< "$VERSION_K8S")+$COMMIT" + VERSION_TAG="$(sed -e 's/+/-/g' <<< "$VERSION")" fi