Skip to content

Commit ab4ef10

Browse files
committed
feat: Add support for updating specific Unity component versions in deploy script
1 parent 4cd1116 commit ab4ef10

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

nightly_tests/deploy.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,28 @@ process_config_file() {
126126
fi
127127

128128
# Process MarketplaceItems
129+
local yq_script='del(.ManagementConsole)'
130+
129131
if [ "$LATEST" = true ]; then
130132
# Set all versions to "latest" if --latest flag is present
131-
yq eval 'del(.ManagementConsole) | .MarketplaceItems[].version = "latest"' "$1"
133+
yq_script+=' | .MarketplaceItems[].version = "latest"'
132134
else
133-
# Just return the MarketplaceItems section without ManagementConsole
134-
yq eval 'del(.ManagementConsole) | .MarketplaceItems' "$1"
135+
# Update specific versions if parameters are provided
136+
if [ -n "$UNITY_CS_MONITORING_LAMBDA_VERSION" ]; then
137+
yq_script+=' | (.MarketplaceItems[] | select(.name == "unity-cs-monitoring-lambda").version) = "'$UNITY_CS_MONITORING_LAMBDA_VERSION'"'
138+
fi
139+
if [ -n "$UNITY_APIGATEWAY_VERSION" ]; then
140+
yq_script+=' | (.MarketplaceItems[] | select(.name == "unity-apigateway").version) = "'$UNITY_APIGATEWAY_VERSION'"'
141+
fi
142+
if [ -n "$UNITY_PROXY_VERSION" ]; then
143+
yq_script+=' | (.MarketplaceItems[] | select(.name == "unity-proxy").version) = "'$UNITY_PROXY_VERSION'"'
144+
fi
145+
if [ -n "$UNITY_UI_VERSION" ]; then
146+
yq_script+=' | (.MarketplaceItems[] | select(.name == "unity-ui").version) = "'$UNITY_UI_VERSION'"'
147+
fi
135148
fi
149+
150+
yq eval "$yq_script" "$1"
136151
else
137152
echo "[]"
138153
fi

0 commit comments

Comments
 (0)