1
0
mirror of https://github.com/lineageos4microg/docker-lineage-cicd synced 2024-11-09 10:09:56 +01: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

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