From 28a455abbf813cf0ad1332a9526576e8d343ad50 Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Date: Mon, 28 Oct 2024 11:54:08 +0100 Subject: [PATCH] chore: fix tag naming --- common.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common.sh b/common.sh index 32976820..9b4d8c41 100755 --- a/common.sh +++ b/common.sh @@ -40,20 +40,23 @@ if [[ -d /usr/local/opt/gnu-sed/libexec/gnubin ]]; then fi version-aliases() { - local version=$1 + local dir=$1 local branch=$2 - dockerfileMavenVersion="$(grep -m1 'ARG MAVEN_VERSION=' "$version/Dockerfile" | cut -d'=' -f2)" + dockerfileMavenVersion="$(grep -m1 'ARG MAVEN_VERSION=' "$dir/Dockerfile" | cut -d'=' -f2)" mavenVersion="${dockerfileMavenVersion}" extraSuffixes=() - extraSuffixesString="$(grep -m1 '# EXTRA_TAG_SUFFIXES=' "$version/Dockerfile" | cut -d'=' -f2)" + extraSuffixesString="$(grep -m1 '# EXTRA_TAG_SUFFIXES=' "$dir/Dockerfile" | cut -d'=' -f2)" if [ -n "${extraSuffixesString}" ]; then for suffix in ${extraSuffixesString//,/ }; do extraSuffixes+=("${suffix}") done fi + # dirs with -maven-4 suffix get that removed + local version="${dir/-maven-4/}" + versionAliases=() while [ "${mavenVersion%[.-]*}" != "$mavenVersion" ]; do versionAliases+=("$mavenVersion-$version")