Skip to content

Commit d02a76f

Browse files
committed
feat: Ensure MC_VERSION is set to "latest" when --latest flag is used
1 parent 6338222 commit d02a76f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

nightly_tests/deploy.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,20 @@ process_config_file() {
111111
local mc_release=$(yq eval '.ManagementConsole.release' "$1")
112112
local mc_sha=$(yq eval '.ManagementConsole.sha' "$1")
113113

114-
# Update MC_VERSION and MC_SHA if values exist and no CLI override
115-
if [ -n "$mc_release" ] && [ "$MC_VERSION" = "latest" ]; then
114+
# Update MC_VERSION only if --latest is not set and no CLI override
115+
if [ "$LATEST" = false ] && [ -n "$mc_release" ] && [ "$MC_VERSION" = "latest" ]; then
116116
MC_VERSION="$mc_release"
117117
fi
118118
if [ -n "$mc_sha" ] && [ -z "$MC_SHA" ]; then
119119
MC_SHA="$mc_sha"
120120
fi
121121
fi
122122

123+
# Force MC_VERSION to "latest" if --latest flag is set
124+
if [ "$LATEST" = true ]; then
125+
MC_VERSION="latest"
126+
fi
127+
123128
# Process MarketplaceItems
124129
if [ "$LATEST" = true ]; then
125130
# Set all versions to "latest" if --latest flag is present

0 commit comments

Comments
 (0)