1
0
Fork 0
mirror of https://github.com/lineageos4microg/docker-lineage-cicd synced 2024-05-06 11:16:07 +02:00

Make calling mka switchable

This commit is contained in:
Pete 2023-12-04 12:48:39 +00:00 committed by Pete Fotheringham
parent 5d2bac89e7
commit fd213ff4b0

View File

@ -394,20 +394,22 @@ for branch in ${BRANCH_NAME//,/ }; do
/root/userscripts/pre-build.sh "$codename" &>> "$DEBUG_LOG" || echo ">> [$(date)] Warning: pre-build.sh failed!"
fi
# Start the build
echo ">> [$(date)] Starting build for $codename, $branch branch" | tee -a "$DEBUG_LOG"
build_successful=false
if (set +eu ; mka "${jobs_arg[@]}" bacon) &>> "$DEBUG_LOG"; then
build_successful=true
if [ "$CALL_MKA" = true ]; then
# Start the build
echo ">> [$(date)] Starting build for $codename, $branch branch" | tee -a "$DEBUG_LOG"
build_successful=false
if (set +eu ; mka "${jobs_arg[@]}" bacon) &>> "$DEBUG_LOG"; then
# Move produced ZIP files to the main OUT directory
echo ">> [$(date)] Moving build artifacts for $codename to '$ZIP_DIR/$zipsubdir'" | tee -a "$DEBUG_LOG"
cd out/target/product/"$codename"
files_to_hash=()
for build in lineage-*.zip; do
cp -v system/build.prop "$ZIP_DIR/$zipsubdir/$build.prop" &>> "$DEBUG_LOG"
mv "$build" "$ZIP_DIR/$zipsubdir/" &>> "$DEBUG_LOG"
files_to_hash+=( "$build" )
done
# Move produced ZIP files to the main OUT directory
echo ">> [$(date)] Moving build artifacts for $codename to '$ZIP_DIR/$zipsubdir'" | tee -a "$DEBUG_LOG"
cd out/target/product/"$codename"
files_to_hash=()
for build in lineage-*.zip; do
cp -v system/build.prop "$ZIP_DIR/$zipsubdir/$build.prop" &>> "$DEBUG_LOG"
mv "$build" "$ZIP_DIR/$zipsubdir/" &>> "$DEBUG_LOG"
files_to_hash+=( "$build" )
done
cd "$source_dir/out/target/product/$codename/obj/PACKAGING/target_files_intermediates/lineage_$codename-target_files-eng.root/IMAGES/"
for image in recovery boot vendor_boot dtbo super_empty vbmeta vendor_kernel_boot; do
@ -424,9 +426,13 @@ for branch in ${BRANCH_NAME//,/ }; do
done
cd "$source_dir"
build_successful=true
else
echo ">> [$(date)] Failed build for $codename" | tee -a "$DEBUG_LOG"
fi
else
echo ">> [$(date)] Failed build for $codename" | tee -a "$DEBUG_LOG"
fi
echo ">> [$(date)] Calling mka for $codename, $branch branch disabled"
fi
# Remove old zips and logs
if [ "$DELETE_OLD_ZIPS" -gt "0" ]; then