fix(promote-to-production): reemplazar perl por awk, no esta en el host ZimaOS
This commit is contained in:
1 parent
2058f1ca2a
commit
b06c1f211e
1 file changed
+9
-2
@@ -54,8 +54,15 @@ git checkout -B main origin/main
|
||||
sed -i -E "s|(image: ${IMAGE_NAME}:).*|\1${STAGING_VERSION}|g" "${PROD_MANIFEST}"
|
||||
|
||||
# Mismo bump que hace build.yaml en Staging -- el footer lee APP_VERSION
|
||||
# para mostrar la version real desplegada.
|
||||
perl -0777 -pi -e "s/(- name: APP_VERSION\n\s*value: ).*/\${1}${STAGING_VERSION}/" "${PROD_MANIFEST}"
|
||||
# para mostrar la version real desplegada. awk en vez de perl (usado en
|
||||
# build.yaml, donde sí está disponible porque corre en un runner
|
||||
# ubuntu-latest): el host real de ZimaOS donde se corre este script a
|
||||
# mano no trae perl instalado (confirmado en vivo 2026-09-20), a
|
||||
# diferencia de sed/awk que sí son parte del sistema base.
|
||||
awk -v ver="${STAGING_VERSION}" '
|
||||
/- name: APP_VERSION/ { print; getline; sub(/value:.*/, "value: " ver); print; next }
|
||||
{ print }
|
||||
' "${PROD_MANIFEST}" > "${PROD_MANIFEST}.tmp" && mv "${PROD_MANIFEST}.tmp" "${PROD_MANIFEST}"
|
||||
|
||||
git add "${PROD_MANIFEST}"
|
||||
if git diff --cached --quiet; then
|
||||
|
||||
Reference in new issue
Block a user