Skip to content

Commit

Permalink
fix: adjust PLV8 image tags (#189)
Browse files Browse the repository at this point in the history
Signed-off-by: Niccolò Fei <[email protected]>
  • Loading branch information
NiccoloFei authored Sep 30, 2024
1 parent 0b9d53c commit da8d784
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/generate-strategy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ generator() {
fullTagMultiArch="${fullVersion}-${releaseVersion}-multiarch-ubi${ubiRelease}"

if [ "${version}" -ge "15" ]; then
fullTagPLV8="${fullVersion}-${releaseVersion}-plv8${ubiRelease}"
fullTagPLV8="${fullVersion}-${releaseVersion}-plv8-ubi${ubiRelease}"
fi

# Initial aliases are "major version", "optional alias", "full version with release"
Expand All @@ -88,6 +88,14 @@ generator() {
"${fullTagMultiArch}"
)

if [ "${version}" -ge "15" ]; then
versionAliasesPLV8=(
"${version}${beta}-plv8-ubi${ubiRelease}"
${aliases[$version]:+"${aliases[$version]}-plv8-ubi${ubiRelease}"}
"${fullTagPLV8}"
)
fi

# If we are on the default distro, add the same tags as above but
# leaving out the distribution
if [[ "${ubiRelease}" == "${DEFAULT_UBI}" ]]; then
Expand All @@ -106,12 +114,13 @@ generator() {
${aliases[$version]:+"${aliases[$version]}-multiarch"}
"${fullVersion}-${releaseVersion}-multiarch"
)

if [ "${version}" -ge "15" ]; then
versionAliasesPLV8=(
"${version}${beta}"
${aliases[$version]:+"${aliases[$version]}-multiarch"}
"${fullTagPLV8}"
)
versionAliasesPLV8=(
"${version}${beta}-plv8"
${aliases[$version]:+"${aliases[$version]}-plv8"}
"${fullVersion}-${releaseVersion}-plv8"
)
fi
fi

Expand All @@ -121,7 +130,6 @@ generator() {
versionAliases+=("$fullVersion-ubi${ubiRelease}")
versionAliasesMultiLang+=("$fullVersion-multilang-ubi${ubiRelease}")
versionAliasesMultiArch+=("$fullVersion-multiarch-ubi${ubiRelease}")
versionAliasesPLV8+=("$fullVersion-plv8-ubi${ubiRelease}")
if [[ "${ubiRelease}" == "${DEFAULT_UBI}" ]]; then
versionAliases+=("$fullVersion")
versionAliasesMultiLang+=("$fullVersion-multilang")
Expand All @@ -142,7 +150,7 @@ generator() {
)

if [ "${version}" -ge "15" ]; then
entries+=("{\"name\": \"${fullVersion} UBI${ubiRelease} PLV8\", \"ubi_version\": \"$ubiVersion\", \"platforms\": \"linux/amd64\", \"dir\": \"UBI/$version\", \"file\": \"UBI/$version/Dockerfile.plv8.ubi${ubiRelease}\", \"version\": \"$version\", \"flavor\": \"ubi${ubiRelease}-plv8\", \"tags\": [\"$(join "\", \"" "${versionAliasesPLV8[@]}")\"], \"fullTag\": \"${fullTagMultiArch}\"}")
entries+=("{\"name\": \"${fullVersion} UBI${ubiRelease} PLV8\", \"ubi_version\": \"$ubiVersion\", \"platforms\": \"linux/amd64\", \"dir\": \"UBI/$version\", \"file\": \"UBI/$version/Dockerfile.plv8.ubi${ubiRelease}\", \"version\": \"$version\", \"flavor\": \"ubi${ubiRelease}-plv8\", \"tags\": [\"$(join "\", \"" "${versionAliasesPLV8[@]}")\"], \"fullTag\": \"${fullTagPLV8}\"}")
fi
done
}
Expand Down

0 comments on commit da8d784

Please sign in to comment.