From b06c1f211e2e4913ee5980f8c83a6b68faff78dd Mon Sep 17 00:00:00 2001 From: Cristian Felipe Cruz Buitron Date: Sun, 20 Sep 2026 17:44:52 +0000 Subject: [PATCH] fix(promote-to-production): reemplazar perl por awk, no esta en el host ZimaOS --- promote-to-production.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/promote-to-production.sh b/promote-to-production.sh index 42b42b5..569d133 100755 --- a/promote-to-production.sh +++ b/promote-to-production.sh @@ -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