commit:     b7e493b4e4ad6cf6f9367e4b139df042526c21de
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 15 03:44:41 2017 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Fri Dec 15 03:44:41 2017 +0000
URL:        https://gitweb.gentoo.org/proj/releng.git/commit/?id=b7e493b4

catalyst-auto: run trigger_post_build after every successful spec, to export 
results sooner.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 tools/catalyst-auto | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/tools/catalyst-auto b/tools/catalyst-auto
index 35443c4a..f605873c 100755
--- a/tools/catalyst-auto
+++ b/tools/catalyst-auto
@@ -115,6 +115,13 @@ catalyst_var() {
   (. "${CATALYST_CONFIG}"; echo "${!var}")
 }
 
+trigger_post_build() {
+  if ! run_cmd "${TMPDIR}/log/post_build.log" post_build; then
+    send_email "Catalyst build error - post_build" "The post_build function 
failed" "${TMPDIR}/log/post_build.log"
+    exit 1
+  fi
+}
+
 # Parse args
 while [ ${#} -gt 0 ]
 do
@@ -334,6 +341,8 @@ for a in "" ${SETS}; do
       build_failure=1
       send_email "Catalyst fatal build error - ${i}" "" "${LOGFILE}"
       continue 2
+    else
+      trigger_post_build
     fi
   done
 
@@ -344,6 +353,8 @@ for a in "" ${SETS}; do
       build_failure=1
       send_email "Catalyst non-fatal build error - ${i}" "" "${LOGFILE}"
       break
+    else
+      trigger_post_build
     fi
   done
 
@@ -355,10 +366,7 @@ for a in "" ${SETS}; do
   update_symlinks
 done
 
-if ! run_cmd "${TMPDIR}/log/post_build.log" post_build; then
-  send_email "Catalyst build error - post_build" "The post_build function 
failed" "${TMPDIR}/log/post_build.log"
-  exit 1
-fi
+trigger_post_build
 
 if [ ${build_failure} = 0 ]; then
   if [[ ${lastrun} -ne 0 ]]; then

Reply via email to