Skip to content

Commit

Permalink
chore: review
Browse files Browse the repository at this point in the history
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
  • Loading branch information
NiccoloFei committed Jun 20, 2024
1 parent dd60097 commit e89ae2f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/generate-strategy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ source "${ROOT_DIR}/lib/repo_funcs.sh"

# Define an optional aliases for some major versions
declare -A aliases=(
[16]='latest'
[$POSTGRESQL_LATEST_MAJOR_RELEASE]='latest'
)

# Define the current default distribution
Expand Down Expand Up @@ -69,13 +69,18 @@ generator() {

# Additional aliases in case we are running in the default distro
# i.e. "14", "14.2", "14.2-1", "latest"
if [[ "${distro}" == "${DEFAULT_DISTRO}" ]] && [[ ${version} -le "${POSTGRESQL_LATEST_MAJOR_RELEASE}" ]]; then
if [[ "${distro}" == "${DEFAULT_DISTRO}" ]]; then
versionAliases+=(
"$version"
"${postgresImageVersion}"
"${postgresImageVersion}-${releaseVersion}"
${aliases[$version]:+"${aliases[$version]}"}
)
# Create a tag with just the major (e.g "14") only for stable versions
if [[ "${version}" -le "${POSTGRESQL_LATEST_MAJOR_RELEASE}" ]]; then
versionAliases+=(
"$version"
)
fi
fi

# Supported platforms for container images
Expand Down

0 comments on commit e89ae2f

Please sign in to comment.