Merge "Ensure semver publishing for all krm functions"

This commit is contained in:
Zuul 2021-03-17 17:49:20 +00:00 committed by Gerrit Code Review
commit 04149bd8ae

View File

@ -38,16 +38,16 @@ jobs:
set -e
TAG=$(echo "${TAG_REF}" | sed -e 's|refs/tags/||')
for i in '' replacement-transformer- templater-
for IMG in airshipctl $(cd krm-functions; echo */ | tr -d /)
do
if [[ "$TAG" =~ ^($i)?v?(([0-9]+)\.([0-9]+)\.([0-9]+)(-[a-zA-Z]+(\.[0-9]+)?)?)$ ]]
if [[ $IMG == airshipctl ]]
then
TAG_PREFIX=
else
TAG_PREFIX=$IMG-
fi
if [[ "$TAG" =~ ^($TAG_PREFIX)?v?(([0-9]+)\.([0-9]+)\.([0-9]+)(-[a-zA-Z]+(\.[0-9]+)?)?)$ ]]
then
if [[ -z ${BASH_REMATCH[1]} ]]
then
IMG=airshipctl
else
IMG=${i%-}
fi
TAGS="${BASH_REMATCH[2]}"
# Prereleases don't count as major and minor
if [[ -z ${BASH_REMATCH[6]} ]]