Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 32 additions & 12 deletions test/assets/common_versions.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -141,23 +141,43 @@ export CNCF_SYSTEMD_LOGS_VERSION={CNCF_SYSTEMD_LOGS_VERSION}
# The current version of the microshift-gitops package.
export GITOPS_VERSION={GITOPS_VERSION}

# The brew release versions needed for release regression testing
BREW_Y0_RELEASE_VERSION="$(get_vrel_from_rpm "${{BREW_RPM_SOURCE}}/4.${{MINOR_VERSION}}-zstream/{ARCH}/")"
BREW_Y1_RELEASE_VERSION="$(get_vrel_from_rpm "${{BREW_RPM_SOURCE}}/4.${{PREVIOUS_MINOR_VERSION}}-zstream/{ARCH}/")"
BREW_Y2_RELEASE_VERSION="$(get_vrel_from_rpm "${{BREW_RPM_SOURCE}}/4.${{YMINUS2_MINOR_VERSION}}-zstream/{ARCH}/")"
BREW_RC_RELEASE_VERSION="$(get_vrel_from_rpm "${{BREW_RPM_SOURCE}}/4.${{MINOR_VERSION}}-rc/{ARCH}/")"
BREW_EC_RELEASE_VERSION="$(get_vrel_from_rpm "${{BREW_RPM_SOURCE}}/4.${{MINOR_VERSION}}-ec/{ARCH}/")"
BREW_NIGHTLY_RELEASE_VERSION="$(get_vrel_from_rpm "${{BREW_RPM_SOURCE}}/4.${{MINOR_VERSION}}-nightly/{ARCH}/")"
export BREW_Y0_RELEASE_VERSION
export BREW_Y1_RELEASE_VERSION
export BREW_Y2_RELEASE_VERSION
# The brew release versions needed for release regression testing.
# These versions are discovered from RPM directories previously downloaded
# by manage_brew_rpms.sh into the BREW_RPM_SOURCE directory.
#
# Version naming convention (for X.Y.Z format where X=major, Y=minor, Z=patch):
# - ZSTREAM: Latest z-stream of current minor (e.g., 4.22.7) - for current release testing
# - PREV_ZSTREAM: Second-to-latest z-stream of current minor (e.g., 4.22.4) - for Z-to-Z upgrade testing.
# Equals ZSTREAM when only one z-stream is available.
# - YMINUS1: Latest z-stream of previous minor (e.g., 4.21.26) - for Y-1 upgrade testing
# - YMINUS2: Latest z-stream of Y-2 minor (e.g., 4.20.44) - for Y-2 upgrade testing
ZSTREAM_VERSION="$(find "${{BREW_RPM_SOURCE}}" -maxdepth 1 -type d -regex ".*/[45]\.${{MINOR_VERSION}}\.[0-9]+$" -printf '%f\n' | sort -V | tail -n1 || echo "")"
PREV_ZSTREAM_VERSION="$(find "${{BREW_RPM_SOURCE}}" -maxdepth 1 -type d -regex ".*/[45]\.${{MINOR_VERSION}}\.[0-9]+$" -printf '%f\n' | sort -V | tail -n2 | head -n1 || echo "")"
YMINUS1_VERSION="$(find "${{BREW_RPM_SOURCE}}" -maxdepth 1 -type d -regex ".*/[45]\.${{PREVIOUS_MINOR_VERSION}}\.[0-9]+$" -printf '%f\n' | sort -V | tail -n1 || echo "")"
YMINUS2_VERSION="$(find "${{BREW_RPM_SOURCE}}" -maxdepth 1 -type d -regex ".*/[45]\.${{YMINUS2_MINOR_VERSION}}\.[0-9]+$" -printf '%f\n' | sort -V | tail -n1 || echo "")"
RC_VERSION="$(find "${{BREW_RPM_SOURCE}}" -maxdepth 1 -type d -regex ".*/[45]\.${{MINOR_VERSION}}\.[0-9]*-rc$" -printf '%f\n' | sort -V | tail -n1 || echo "")"
EC_VERSION="$(find "${{BREW_RPM_SOURCE}}" -maxdepth 1 -type d -regex ".*/[45]\.${{MINOR_VERSION}}\.[0-9]*-ec$" -printf '%f\n' | sort -V | tail -n1 || echo "")"
NIGHTLY_VERSION="$(find "${{BREW_RPM_SOURCE}}" -maxdepth 1 -type d -regex ".*/[45]\.${{MINOR_VERSION}}\.[0-9]*-nightly$" -printf '%f\n' | sort -V | tail -n1 || echo "")"

BREW_ZSTREAM_VERSION="$(get_vrel_from_rpm "${{BREW_RPM_SOURCE}}/${{ZSTREAM_VERSION}}/{ARCH}/")"
BREW_PREV_ZSTREAM_VERSION="$(get_vrel_from_rpm "${{BREW_RPM_SOURCE}}/${{PREV_ZSTREAM_VERSION}}/{ARCH}/")"
BREW_YMINUS1_VERSION="$(get_vrel_from_rpm "${{BREW_RPM_SOURCE}}/${{YMINUS1_VERSION}}/{ARCH}/")"
BREW_YMINUS2_VERSION="$(get_vrel_from_rpm "${{BREW_RPM_SOURCE}}/${{YMINUS2_VERSION}}/{ARCH}/")"
BREW_RC_RELEASE_VERSION="$(get_vrel_from_rpm "${{BREW_RPM_SOURCE}}/${{RC_VERSION}}/{ARCH}/")"
BREW_EC_RELEASE_VERSION="$(get_vrel_from_rpm "${{BREW_RPM_SOURCE}}/${{EC_VERSION}}/{ARCH}/")"
BREW_NIGHTLY_RELEASE_VERSION="$(get_vrel_from_rpm "${{BREW_RPM_SOURCE}}/${{NIGHTLY_VERSION}}/{ARCH}/")"

export BREW_ZSTREAM_VERSION
export BREW_PREV_ZSTREAM_VERSION
export BREW_YMINUS1_VERSION
export BREW_YMINUS2_VERSION
export BREW_RC_RELEASE_VERSION
export BREW_EC_RELEASE_VERSION
export BREW_NIGHTLY_RELEASE_VERSION

# Set the release type based on priority: zstream > RC > EC > nightly
if [ -n "${{BREW_Y0_RELEASE_VERSION}}" ]; then
BREW_LREL_RELEASE_VERSION="${{BREW_Y0_RELEASE_VERSION}}"
if [ -n "${{BREW_ZSTREAM_VERSION}}" ]; then
BREW_LREL_RELEASE_VERSION="${{BREW_ZSTREAM_VERSION}}"
elif [ -n "${{BREW_RC_RELEASE_VERSION}}" ]; then
BREW_LREL_RELEASE_VERSION="${{BREW_RC_RELEASE_VERSION}}"
elif [ -n "${{BREW_EC_RELEASE_VERSION}}" ]; then
Expand Down
6 changes: 3 additions & 3 deletions test/bin/build_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,9 @@ if ${EXTRACT_CONTAINER_IMAGES}; then
extract_container_images "${PREVIOUS_RELEASE_VERSION}" "${PREVIOUS_RELEASE_REPO}" "${CONTAINER_LIST}"
extract_container_images "${YMINUS2_RELEASE_VERSION}" "${YMINUS2_RELEASE_REPO}" "${CONTAINER_LIST}"
# The following images are specific to the brew release versions.
[ -n "${BREW_Y0_RELEASE_VERSION}" ] && extract_container_images "${BREW_Y0_RELEASE_VERSION}" "${BREW_REPO}" "${CONTAINER_LIST}"
[ -n "${BREW_Y1_RELEASE_VERSION}" ] && extract_container_images "${BREW_Y1_RELEASE_VERSION}" "${BREW_REPO}" "${CONTAINER_LIST}"
[ -n "${BREW_Y2_RELEASE_VERSION}" ] && extract_container_images "${BREW_Y2_RELEASE_VERSION}" "${BREW_REPO}" "${CONTAINER_LIST}"
[ -n "${BREW_PREV_ZSTREAM_VERSION}" ] && extract_container_images "${BREW_PREV_ZSTREAM_VERSION}" "${BREW_REPO}" "${CONTAINER_LIST}"
[ -n "${BREW_YMINUS1_VERSION}" ] && extract_container_images "${BREW_YMINUS1_VERSION}" "${BREW_REPO}" "${CONTAINER_LIST}"
[ -n "${BREW_YMINUS2_VERSION}" ] && extract_container_images "${BREW_YMINUS2_VERSION}" "${BREW_REPO}" "${CONTAINER_LIST}"
[ -n "${BREW_RC_RELEASE_VERSION}" ] && extract_container_images "${BREW_RC_RELEASE_VERSION}" "${BREW_REPO}" "${CONTAINER_LIST}"
[ -n "${BREW_EC_RELEASE_VERSION}" ] && extract_container_images "${BREW_EC_RELEASE_VERSION}" "${BREW_REPO}" "${CONTAINER_LIST}"
[ -n "${BREW_NIGHTLY_RELEASE_VERSION}" ] && extract_container_images "${BREW_NIGHTLY_RELEASE_VERSION}" "${BREW_REPO}" "${CONTAINER_LIST}"
Expand Down
56 changes: 50 additions & 6 deletions test/bin/build_rpms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,60 @@ download_brew_rpms() {
rm -rf "${BREW_RPM_SOURCE}"
# Run the download procedure
bash -x "${SCRIPTDIR}/../../scripts/fetch_tools.sh" brew
bash -x "${SCRIPTDIR}/manage_brew_rpms.sh" download "4.${MINOR_VERSION}" "${BREW_RPM_SOURCE}" "zstream" || true
bash -x "${SCRIPTDIR}/manage_brew_rpms.sh" download "4.${PREVIOUS_MINOR_VERSION}" "${BREW_RPM_SOURCE}" "zstream" || true
bash -x "${SCRIPTDIR}/manage_brew_rpms.sh" download "4.${YMINUS2_MINOR_VERSION}" "${BREW_RPM_SOURCE}" "zstream" || true
bash -x "${SCRIPTDIR}/manage_brew_rpms.sh" download "4.${MINOR_VERSION}" "${BREW_RPM_SOURCE}" "rc" || true
bash -x "${SCRIPTDIR}/manage_brew_rpms.sh" download "4.${MINOR_VERSION}" "${BREW_RPM_SOURCE}" "ec" || true
bash -x "${SCRIPTDIR}/manage_brew_rpms.sh" download "4.${MINOR_VERSION}" "${BREW_RPM_SOURCE}" "nightly" || true
bash -x "${SCRIPTDIR}/manage_brew_rpms.sh" download "4.${MINOR_VERSION}" "${BREW_RPM_SOURCE}" "rc" || echo "WARNING: Failed to download RC RPMs for 4.${MINOR_VERSION}"
bash -x "${SCRIPTDIR}/manage_brew_rpms.sh" download "4.${MINOR_VERSION}" "${BREW_RPM_SOURCE}" "ec" || echo "WARNING: Failed to download EC RPMs for 4.${MINOR_VERSION}"
bash -x "${SCRIPTDIR}/manage_brew_rpms.sh" download "4.${MINOR_VERSION}" "${BREW_RPM_SOURCE}" "zstream" || echo "WARNING: Failed to download zstream RPMs for 4.${MINOR_VERSION}"
bash -x "${SCRIPTDIR}/manage_brew_rpms.sh" download "4.${MINOR_VERSION}" "${BREW_RPM_SOURCE}" "nightly" || echo "WARNING: Failed to download nightly RPMs for 4.${MINOR_VERSION}"
bash -x "${SCRIPTDIR}/manage_brew_rpms.sh" download "4.${PREVIOUS_MINOR_VERSION}" "${BREW_RPM_SOURCE}" "zstream" || echo "WARNING: Failed to download zstream RPMs for 4.${PREVIOUS_MINOR_VERSION}"
# Y-2 failure returns an error because it is the minimum supported upgrade, path and must always be available for release testing to proceed.
bash -x "${SCRIPTDIR}/manage_brew_rpms.sh" download "4.${YMINUS2_MINOR_VERSION}" "${BREW_RPM_SOURCE}" "zstream" || ( echo "WARNING: Failed to download zstream RPMs for 4.${YMINUS2_MINOR_VERSION}" && return 1 )
Comment on lines 124 to 130
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find YMINUS2 references and context
rg -n "YMINUS2" --type=sh -C3

Repository: openshift/microshift

Length of output: 12388


🏁 Script executed:

#!/bin/bash
# Check the function context around lines 124-129
sed -n '100,140p' test/bin/build_rpms.sh | cat -n

Repository: openshift/microshift

Length of output: 2679


🏁 Script executed:

#!/bin/bash
# Look for any comments or documentation in build_rpms.sh explaining the error handling
head -50 test/bin/build_rpms.sh

Repository: openshift/microshift

Length of output: 1719


Add comment explaining why Y-2 download failure exits the function while other downloads only warn.

The Y-2 zstream download (line 130) uses return 1 on failure, causing the entire function to exit with an error, while RC, EC, nightly, and Y-1 zstream downloads only emit warnings. If this asymmetry is intentional (Y-2 is mandatory for upgrade testing while others are optional), add an inline comment to clarify the design decision for future maintainers.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/bin/build_rpms.sh` around lines 124 - 129, Add an inline comment next to
the failing Y-2 zstream download invocation (the bash call that uses
"${YMINUS2_MINOR_VERSION}" and ends with "&& return 1") explaining why this
download must fail the function while the other manage_brew_rpms.sh download
calls for RC, EC, nightly and Y-1 only emit warnings; reference that this is
intentional because the Y-2 zstream RPM is required for upgrade testing (or
whatever the policy is) so failure should abort, and briefly state that other
artifacts are optional so they only warn.

else
echo "WARNING: The Brew Hub site is not accessible, skipping the download"
fi
}

# Create fake z-stream directories from EC RPMs so that common_versions.sh
# discovers PREV_ZSTREAM_VERSION as non-empty. This allows validating the
# prev-zstream upgrade path even when no real z-stream releases exist yet
# (e.g. during the EC phase of a new minor).
#
# Both fake dirs contain the same EC RPMs, so BREW_PREV_ZSTREAM_VERSION
# resolves to the EC version string, which exists in the brew repo.
#
# TODO: Remove this function once real z-stream releases are available
# for the current minor version.
mock_prev_zstream() {
local ec_dir
source "${SCRIPTDIR}/common_versions.sh"
ec_dir=$(find "${BREW_RPM_SOURCE}" -maxdepth 1 -type d -name "4.${MINOR_VERSION}.0-ec" | head -1)
if [ -z "${ec_dir}" ]; then
echo "WARNING: No EC directory found in ${BREW_RPM_SOURCE}, skipping prev-zstream mock"
return
fi

# Skip if real z-stream directories already exist
local zstream_count
zstream_count=$(find "${BREW_RPM_SOURCE}" -maxdepth 1 -type d -regex ".*/[45]\.${MINOR_VERSION}\.[0-9]+$" | wc -l)
if [ "${zstream_count}" -ge 2 ]; then
echo "Found ${zstream_count} z-stream directories, skipping prev-zstream mock"
return
fi

echo "Creating fake z-stream directories for prev-zstream validation"
for arch_dir in "${ec_dir}"/*/; do
[ -d "${arch_dir}" ] || continue
local arch
arch=$(basename "${arch_dir}")
mkdir -p "${BREW_RPM_SOURCE}/4.${MINOR_VERSION}.1/${arch}"
mkdir -p "${BREW_RPM_SOURCE}/4.${MINOR_VERSION}.2/${arch}"
for rpm in "${arch_dir}"/*.rpm; do
[ -f "${rpm}" ] || continue
ln -sf "${rpm}" "${BREW_RPM_SOURCE}/4.${MINOR_VERSION}.1/${arch}/"
ln -sf "${rpm}" "${BREW_RPM_SOURCE}/4.${MINOR_VERSION}.2/${arch}/"
done
done
}

create_local_repo() {
mkdir -p "${IMAGEDIR}"
cd "${IMAGEDIR}"
Expand All @@ -151,4 +194,5 @@ create_local_repo() {
#
build_rpms
download_brew_rpms
mock_prev_zstream
create_local_repo
18 changes: 16 additions & 2 deletions test/bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ MICROSHIFT_MANDATORY_RPMS_LIST=(
microshift
microshift-release-info
)

## Optional RPMs
MICROSHIFT_Y2_OPTIONAL_RPMS_LIST=(
microshift-olm
microshift-olm-release-info
Expand All @@ -387,24 +389,36 @@ MICROSHIFT_Y1_OPTIONAL_RPMS_LIST=(
microshift-sriov
microshift-sriov-release-info
)
MICROSHIFT_OPTIONAL_RPMS_LIST=(
MICROSHIFT_PREV_ZSTREAM_OPTIONAL_RPMS_LIST=(
"${MICROSHIFT_Y1_OPTIONAL_RPMS_LIST[@]}"
)
MICROSHIFT_OPTIONAL_RPMS_LIST=(
"${MICROSHIFT_PREV_ZSTREAM_OPTIONAL_RPMS_LIST[@]}"
)

## x86_64 RPMs
MICROSHIFT_Y2_X86_64_RPMS_LIST=(
microshift-ai-model-serving
microshift-ai-model-serving-release-info
)
MICROSHIFT_Y1_X86_64_RPMS_LIST=(
"${MICROSHIFT_Y2_X86_64_RPMS_LIST[@]}"
)
MICROSHIFT_X86_64_RPMS_LIST=(
MICROSHIFT_PREV_ZSTREAM_X86_64_RPMS_LIST=(
"${MICROSHIFT_Y1_X86_64_RPMS_LIST[@]}"
)
MICROSHIFT_X86_64_RPMS_LIST=(
"${MICROSHIFT_PREV_ZSTREAM_X86_64_RPMS_LIST[@]}"
)

export MICROSHIFT_MANDATORY_RPMS="${MICROSHIFT_MANDATORY_RPMS_LIST[*]}"

export MICROSHIFT_Y2_OPTIONAL_RPMS="${MICROSHIFT_Y2_OPTIONAL_RPMS_LIST[*]}"
export MICROSHIFT_Y1_OPTIONAL_RPMS="${MICROSHIFT_Y1_OPTIONAL_RPMS_LIST[*]}"
export MICROSHIFT_PREV_ZSTREAM_OPTIONAL_RPMS="${MICROSHIFT_PREV_ZSTREAM_OPTIONAL_RPMS_LIST[*]}"
export MICROSHIFT_OPTIONAL_RPMS="${MICROSHIFT_OPTIONAL_RPMS_LIST[*]}"

export MICROSHIFT_Y2_X86_64_RPMS="${MICROSHIFT_Y2_X86_64_RPMS_LIST[*]}"
export MICROSHIFT_Y1_X86_64_RPMS="${MICROSHIFT_Y1_X86_64_RPMS_LIST[*]}"
export MICROSHIFT_PREV_ZSTREAM_X86_64_RPMS="${MICROSHIFT_PREV_ZSTREAM_X86_64_RPMS_LIST[*]}"
export MICROSHIFT_X86_64_RPMS="${MICROSHIFT_X86_64_RPMS_LIST[*]}"
44 changes: 32 additions & 12 deletions test/bin/common_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,23 +141,43 @@ export CNCF_SYSTEMD_LOGS_VERSION=v0.4
# The current version of the microshift-gitops package.
export GITOPS_VERSION=1.16

# The brew release versions needed for release regression testing
BREW_Y0_RELEASE_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/4.${MINOR_VERSION}-zstream/${UNAME_M}/")"
BREW_Y1_RELEASE_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/4.${PREVIOUS_MINOR_VERSION}-zstream/${UNAME_M}/")"
BREW_Y2_RELEASE_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/4.${YMINUS2_MINOR_VERSION}-zstream/${UNAME_M}/")"
BREW_RC_RELEASE_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/4.${MINOR_VERSION}-rc/${UNAME_M}/")"
BREW_EC_RELEASE_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/4.${MINOR_VERSION}-ec/${UNAME_M}/")"
BREW_NIGHTLY_RELEASE_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/4.${MINOR_VERSION}-nightly/${UNAME_M}/")"
export BREW_Y0_RELEASE_VERSION
export BREW_Y1_RELEASE_VERSION
export BREW_Y2_RELEASE_VERSION
# The brew release versions needed for release regression testing.
# These versions are discovered from RPM directories previously downloaded
# by manage_brew_rpms.sh into the BREW_RPM_SOURCE directory.
#
# Version naming convention (for X.Y.Z format where X=major, Y=minor, Z=patch):
# - ZSTREAM: Latest z-stream of current minor (e.g., 4.22.7) - for current release testing
# - PREV_ZSTREAM: Second-to-latest z-stream of current minor (e.g., 4.22.4) - for Z-to-Z upgrade testing.
# Equals ZSTREAM when only one z-stream is available.
# - YMINUS1: Latest z-stream of previous minor (e.g., 4.21.26) - for Y-1 upgrade testing
# - YMINUS2: Latest z-stream of Y-2 minor (e.g., 4.20.44) - for Y-2 upgrade testing
ZSTREAM_VERSION="$(find "${BREW_RPM_SOURCE}" -maxdepth 1 -type d -regex ".*/[45]\.${MINOR_VERSION}\.[0-9]+$" -printf '%f\n' | sort -V | tail -n1 || echo "")"
PREV_ZSTREAM_VERSION="$(find "${BREW_RPM_SOURCE}" -maxdepth 1 -type d -regex ".*/[45]\.${MINOR_VERSION}\.[0-9]+$" -printf '%f\n' | sort -V | tail -n2 | head -n1 || echo "")"
YMINUS1_VERSION="$(find "${BREW_RPM_SOURCE}" -maxdepth 1 -type d -regex ".*/[45]\.${PREVIOUS_MINOR_VERSION}\.[0-9]+$" -printf '%f\n' | sort -V | tail -n1 || echo "")"
YMINUS2_VERSION="$(find "${BREW_RPM_SOURCE}" -maxdepth 1 -type d -regex ".*/[45]\.${YMINUS2_MINOR_VERSION}\.[0-9]+$" -printf '%f\n' | sort -V | tail -n1 || echo "")"
RC_VERSION="$(find "${BREW_RPM_SOURCE}" -maxdepth 1 -type d -regex ".*/[45]\.${MINOR_VERSION}\.[0-9]*-rc$" -printf '%f\n' | sort -V | tail -n1 || echo "")"
EC_VERSION="$(find "${BREW_RPM_SOURCE}" -maxdepth 1 -type d -regex ".*/[45]\.${MINOR_VERSION}\.[0-9]*-ec$" -printf '%f\n' | sort -V | tail -n1 || echo "")"
NIGHTLY_VERSION="$(find "${BREW_RPM_SOURCE}" -maxdepth 1 -type d -regex ".*/[45]\.${MINOR_VERSION}\.[0-9]*-nightly$" -printf '%f\n' | sort -V | tail -n1 || echo "")"

BREW_ZSTREAM_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/${ZSTREAM_VERSION}/${UNAME_M}/")"
BREW_PREV_ZSTREAM_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/${PREV_ZSTREAM_VERSION}/${UNAME_M}/")"
BREW_YMINUS1_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/${YMINUS1_VERSION}/${UNAME_M}/")"
BREW_YMINUS2_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/${YMINUS2_VERSION}/${UNAME_M}/")"
BREW_RC_RELEASE_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/${RC_VERSION}/${UNAME_M}/")"
BREW_EC_RELEASE_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/${EC_VERSION}/${UNAME_M}/")"
BREW_NIGHTLY_RELEASE_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/${NIGHTLY_VERSION}/${UNAME_M}/")"

export BREW_ZSTREAM_VERSION
export BREW_PREV_ZSTREAM_VERSION
export BREW_YMINUS1_VERSION
export BREW_YMINUS2_VERSION
export BREW_RC_RELEASE_VERSION
export BREW_EC_RELEASE_VERSION
export BREW_NIGHTLY_RELEASE_VERSION

# Set the release type based on priority: zstream > RC > EC > nightly
if [ -n "${BREW_Y0_RELEASE_VERSION}" ]; then
BREW_LREL_RELEASE_VERSION="${BREW_Y0_RELEASE_VERSION}"
if [ -n "${BREW_ZSTREAM_VERSION}" ]; then
BREW_LREL_RELEASE_VERSION="${BREW_ZSTREAM_VERSION}"
elif [ -n "${BREW_RC_RELEASE_VERSION}" ]; then
BREW_LREL_RELEASE_VERSION="${BREW_RC_RELEASE_VERSION}"
elif [ -n "${BREW_EC_RELEASE_VERSION}" ]; then
Expand Down
Loading