From 1e97a94602676b86a8c72297e3f41af9e5740933 Mon Sep 17 00:00:00 2001 From: freetlab Date: Fri, 7 Aug 2026 12:35:02 +0200 Subject: [PATCH] fix(ci): repair the workflow YAML broken by an unindented heredoc The previous commit made build.yml unparseable and no job ran at all: yaml: line 183: could not find expected ':' A `run: |` block is a YAML literal scalar, so every line has to keep the block's indentation. The python3 fallback I added used a heredoc whose body sat at column 0, which terminates the scalar -- YAML then tried to read `import zipfile, sys` as a mapping and gave up. Worse than a broken check: a broken pipeline. The fallback is gone rather than re-indented. unzip is present on this runner, a second code path existed only to guard against a case that was never observed, and its only contribution was an escaping hazard inside YAML inside shell. Verified before pushing this time, which is the actual lesson: - build.yml now parses (yaml.safe_load), 6 + 15 steps; - the guard's `run` script was extracted from the parsed YAML and executed verbatim against the real 45MB base.apk pulled off the device. It prints the drawable inventory, reports ic_stat_pluriwave OK and ic_auto_eq_on / ic_auto_eq_off missing, and exits 1 -- matching an independent zipfile inspection of the same file. Two commits in a row shipped a CI change that had never been run. Both were caught by the user rather than by me. --- .gitea/workflows/build.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 1ae74ef..e08dbb6 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -176,19 +176,11 @@ jobs: fi echo "APK: $APK ($(wc -c < "$APK") bytes)" - if command -v unzip >/dev/null 2>&1; then - LISTADO=$(unzip -Z1 "$APK") - elif command -v python3 >/dev/null 2>&1; then - LISTADO=$(python3 - "$APK" <<'PYZIP' -import zipfile, sys -for nombre in zipfile.ZipFile(sys.argv[1]).namelist(): - print(nombre) -PYZIP - ) - else - echo "Ni unzip ni python3 disponibles: no se puede inspeccionar el APK." + if ! command -v unzip >/dev/null 2>&1; then + echo "unzip no esta disponible: no se puede inspeccionar el APK." exit 1 fi + LISTADO=$(unzip -Z1 "$APK") if [ -z "$LISTADO" ]; then echo "El listado del APK salio vacio; la inspeccion no es fiable."