From 7973c8c6a317d60125d839660499a2ebaf050aab Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Tue, 7 Apr 2026 11:23:32 +0400 Subject: [PATCH] fix: ntfy failure notification on build error (trap ERR) Both Android and Linux build scripts now send ntfy notification when build fails, not just on success. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/build-and-notify.sh | 2 ++ scripts/build-linux-docker.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scripts/build-and-notify.sh b/scripts/build-and-notify.sh index c46e259..aed8d4a 100755 --- a/scripts/build-and-notify.sh +++ b/scripts/build-and-notify.sh @@ -44,6 +44,8 @@ DO_PULL="${2:-0}" notify() { curl -s -d "$1" "$NTFY_TOPIC" > /dev/null 2>&1 || true; } +trap 'notify "WZP Android build FAILED! Check /tmp/wzp-build.log"' ERR + # Pull if requested if [ "$DO_PULL" = "1" ]; then echo ">>> Pulling latest..." diff --git a/scripts/build-linux-docker.sh b/scripts/build-linux-docker.sh index 8ab6a84..a04239a 100755 --- a/scripts/build-linux-docker.sh +++ b/scripts/build-linux-docker.sh @@ -46,6 +46,8 @@ DO_CLEAN="${2:-0}" notify() { curl -s -d "$1" "$NTFY_TOPIC" > /dev/null 2>&1 || true; } +trap 'notify "WZP Linux build FAILED! Check /tmp/wzp-linux-build.log"' ERR + if [ "$DO_PULL" = "1" ]; then echo ">>> Pulling latest..." cd "$BASE_DIR/data/source"