From 7d75fa9e836cb29a141d222384cf47be59a53108 Mon Sep 17 00:00:00 2001 From: Waters Church Date: Thu, 24 Sep 2026 15:43:51 -0400 Subject: [PATCH] Fix the build notification, and stop it crying wolf Run 4 built both apps successfully and then emailed to say the build had FAILED. Two separate faults. The notification step died on bash 3.2, which macOS still ships as /bin/bash. It mis-parses a heredoc inside command substitution when the text contains an apostrophe: the word "anyone's" was enough to produce "unexpected EOF while looking for matching '". Reproduced on the ingest Mac before and after the fix. The body is written to a file first, which avoids the construct entirely. The failure alert was then sent because it keyed off failure() for the whole job, so a bug in the success notification presented as a broken build. It is now scoped to steps.build.outcome, so it reports only what it claims to report. An alert that fires when nothing is wrong trains you to ignore it, which costs more than the missing alert it replaced. Co-Authored-By: Claude Opus 5 --- .gitea/workflows/build-apps.yml | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/build-apps.yml b/.gitea/workflows/build-apps.yml index e9ca41a..de458af 100644 --- a/.gitea/workflows/build-apps.yml +++ b/.gitea/workflows/build-apps.yml @@ -37,6 +37,7 @@ jobs: runs-on: macos steps: - name: Build both apps + id: build run: | set -eu export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH" @@ -97,15 +98,17 @@ jobs: run: | export PATH="/usr/local/bin:$PATH" cd "$HOME/checklist-app" - V="$(node -e 'const c=require("./mobile/release.config.json");console.log(`${c.version} (ios build ${c.iosBuild}, android code ${c.androidVersionCode})`)')" - # The body is built with a heredoc rather than a bare multi-line argument: an - # argument that starts at column 0 ends the YAML block scalar and makes this whole - # file unparseable, which Gitea reports only by silently never running it. - BODY="$(cat < "$BODY_FILE" < "$BODY_FILE" <