From 03bb1239994a37ecd6adf88f0b70304ca7fae694 Mon Sep 17 00:00:00 2001
From: Jim Klimov <jim@jimklimov.com>
Date: Mon, 06 Nov 2023 17:39:26 +0100
Subject: [PATCH] jenkinshelper*.ksh: stage_build_changed(): do not lose track of failures

---
 tools/jenkinshelper-main.ksh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tools/jenkinshelper-main.ksh b/tools/jenkinshelper-main.ksh
index 715ac43..88e4d67 100755
--- a/tools/jenkinshelper-main.ksh
+++ b/tools/jenkinshelper-main.ksh
@@ -56,6 +56,7 @@
 # the components Makefile also (to update COMPONENT_REVISION, etc)
 stage_build_changed() {
 	echo "Last successful commit $1"
+	worst=0
 	for f in $(git diff --name-only HEAD^1 | grep Makefile; exit 0); do
 		echo "jenkinshelper: building for ${f%/*}..."
 		curpwd=$(pwd)
@@ -63,7 +64,11 @@
 		rc=$?
 		cd "${curpwd}"
 		echo "jenkinshelper: done with ${f%/*} return code ${rc}"
+		if [ rc -ne 0 ] ; then
+			worst=$rc
+		fi
 	done
+	return $worst
 }
 
 # prepare the pkg.depotd server instance, if an instance already

--
Gitblit v1.9.3