Skip to content

Commit

Permalink
chore: fix tag naming
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossg committed Oct 28, 2024
1 parent 6527c08 commit 28a455a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 28a455a

Please sign in to comment.