From 3088fa36dc17a37d7c60992c57d723e580f5d875 Mon Sep 17 00:00:00 2001 From: Giancarmine Salucci Date: Mon, 25 May 2026 09:46:16 +0200 Subject: [PATCH] fix: avoid SIGPIPE (exit 141) in release changelog step under pipefail --- .gitea/workflows/android-build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/android-build.yml b/.gitea/workflows/android-build.yml index 9b47e24..39b9c47 100644 --- a/.gitea/workflows/android-build.yml +++ b/.gitea/workflows/android-build.yml @@ -158,11 +158,13 @@ jobs: API="https://git.sal.giize.com/api/v1/repos/mozempk/scopone" # ── Changelog: commits since last build-* tag (or last 30 commits) ── - LAST_TAG=$(git tag --sort=-creatordate | grep -E '^build-[0-9]+$' | head -1 || true) + # Use grep -m1 instead of | head -1 to avoid SIGPIPE under pipefail. + # Use git log -30 flag instead of | head -30 for the same reason. + LAST_TAG=$(git tag --sort=-creatordate | grep -Em1 '^build-[0-9]+$' || true) if [[ -n "$LAST_TAG" ]]; then - COMMIT_LOG=$(git log --oneline "${LAST_TAG}..HEAD" 2>/dev/null || git log --oneline | head -30) + COMMIT_LOG=$(git log --oneline -30 "${LAST_TAG}..HEAD" 2>/dev/null || git log --oneline -30) else - COMMIT_LOG=$(git log --oneline | head -30) + COMMIT_LOG=$(git log --oneline -30) fi # Format as a markdown list and JSON-encode for the API body. MD_LIST=$(echo "$COMMIT_LOG" | sed 's/^/- /')