Module: check_mk
Branch: master
Commit: 28b183dc6ab6ca01e5b162f79df08211530f4d4c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=28b183dc6ab6ca…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Oct 12 08:24:28 2017 +0200
make-agent: Use build command exit code as script exit code
Change-Id: Ibbe386e84fece6e2a9049e7ace60b23cd68d1331
---
agents/windows/make-agent | 3 +++
1 file changed, 3 insertions(+)
diff --git a/agents/windows/make-agent b/agents/windows/make-agent
index 373b06c..fb30f39 100755
--- a/agents/windows/make-agent
+++ b/agents/windows/make-agent
@@ -65,8 +65,11 @@ fi
# Build the Windows agent within chroot by calling the 'build-agent' script.
sudo CHROOT_PATH=$CHROOT_PATH CHROOT_BUILD_DIR=$CHROOT_BUILD_DIR ./do-chroot \
"$CHROOT_BUILD_DIR/agents/windows/build-agent -j${njobs} $targets"
+EXIT_CODE=$?
# Some cleanup: chown build artifacts to the original user.
find . -maxdepth 1 -regextype egrep \
-regex
'(.*\.(exe|msi|m4))|.*\/build.*|.*build_version|.*plugins|.*msibuild|.*Makefile.*|.*configure'
\
-exec sudo chown -R $USER:$USER {} \;
+
+exit $EXIT_CODE