1
0
mirror of https://github.com/lineageos4microg/docker-lineage-cicd synced 2024-11-09 10:09:56 +01:00

Call breakfast

This commit is contained in:
Pete Fotheringham 2024-09-02 15:05:15 +01:00
parent bc6051d962
commit f2ceed579c

@ -306,6 +306,27 @@ for codename in ${devices//,/ }; do
/root/userscripts/before.sh || { echo ">> [$(date)] Error: before.sh failed for $branch!"; userscriptfail=true; continue; }
fi
# Call breakfast
breakfast_returncode=0
if [ "$CALL_BREAKFAST" = true ]; then
set +eu
breakfast "$codename" "$BUILD_TYPE" &>> "$DEBUG_LOG"
breakfast_returncode=$?
set -eu
else
echo ">> [$(date)] Calling breakfast disabled"
fi
if [ $breakfast_returncode -ne 0 ]; then
echo ">> [$(date)] breakfast failed for $codename, $branch branch" | tee -a "$DEBUG_LOG"
# call post-build.sh so the failure is logged in a way that is more visible
if [ -f /root/userscripts/post-build.sh ]; then
echo ">> [$(date)] Running post-build.sh for $codename" >> "$DEBUG_LOG"
/root/userscripts/post-build.sh "$codename" false "$branch" &>> "$DEBUG_LOG" || echo ">> [$(date)] Warning: post-build.sh failed!"
fi
do_cleanup
continue
fi
fi