From bb544833b5cc7142c9a5b930b00990168df48b03 Mon Sep 17 00:00:00 2001 From: Tobias von der Krone Date: Mon, 14 Oct 2013 12:36:08 +0200 Subject: [PATCH] fail after gathering reports if build has failed --- debian_build.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian_build.py b/debian_build.py index 0161918..3147810 100755 --- a/debian_build.py +++ b/debian_build.py @@ -520,6 +520,7 @@ export {gbp_env} FORCE_SHELL=TRUE # .. and finally handle the result if ret: + build_failed = False logger.error('git-buildpackage failed with exitcode {code}'.format(code=ret)) figlet('Build failed') failed_message = 'package build has failed' @@ -530,6 +531,7 @@ export {gbp_env} FORCE_SHELL=TRUE do_uploads = False no_uploads_cause = failed_message else: + build_failed = True figlet('Build OK') # @@ -563,6 +565,10 @@ export {gbp_env} FORCE_SHELL=TRUE except: pass + # now fail if build failed + if build_failed: + exit_error() + # .. let's tag if not do_tagging: figlet('Tagging skipped - {cause}'.format( -- 2.39.5