Skip to content

Commit

Permalink
ci: defer creating major version tag until release (#108)
Browse files Browse the repository at this point in the history
Previously, we were always setting the `version` tag (e.g., 16, 17) when building
a container image. However, version 17 is still in beta and was tagged with `17`,
which could cause confusion. Users might mistake it for a stable release,
and tools like Renovate might attempt to update to this version.

This change ensures that the major `version` tag is not created until the version
is officially released.

Signed-off-by: Jonathan Gonzalez V <jonathan.gonzalez@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
  • Loading branch information
sxd and NiccoloFei committed Jul 1, 2024
1 parent baa64ff commit 6a2cd25
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/generate-strategy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
#
set -eu

ROOT_DIR=$(cd "$(dirname "$0")/../"; pwd)
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 @@ -66,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}" ]; 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 6a2cd25

Please sign in to comment.