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

Make calling envsetup.sh and breakfast switchable

This commit is contained in:
Pete 2023-12-04 12:45:28 +00:00 committed by Pete Fotheringham
parent 0fffa67e4b
commit 8ce45ad262

@ -322,12 +322,16 @@ for branch in ${BRANCH_NAME//,/ }; do
fi
fi
if [ "$PREPARE_BUILD_ENVIRONMENT" = true ]; then
# Prepare the environment
echo ">> [$(date)] Preparing build environment"
set +eu
# shellcheck source=/dev/null
source build/envsetup.sh > /dev/null
set -eu
else
echo ">> [$(date)] Preparing build environment disabled"
fi
if [ -f /root/userscripts/before.sh ]; then
echo ">> [$(date)] Running before.sh"
@ -365,10 +369,16 @@ for branch in ${BRANCH_NAME//,/ }; do
DEBUG_LOG="$LOGS_DIR/$logsubdir/lineage-$los_ver-$builddate-$RELEASE_TYPE-$codename.log"
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