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:
parent
0fffa67e4b
commit
8ce45ad262
30
src/build.sh
30
src/build.sh
@ -322,12 +322,16 @@ for branch in ${BRANCH_NAME//,/ }; do
|
||||
fi
|
||||
fi
|
||||
|
||||
# Prepare the environment
|
||||
echo ">> [$(date)] Preparing build environment"
|
||||
set +eu
|
||||
# shellcheck source=/dev/null
|
||||
source build/envsetup.sh > /dev/null
|
||||
set -eu
|
||||
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"
|
||||
|
||||
set +eu
|
||||
breakfast "$codename" "$BUILD_TYPE" &>> "$DEBUG_LOG"
|
||||
breakfast_returncode=$?
|
||||
set -eu
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user