Merge pull request #2912 from InuSasha/feature/cvh-this-cost-a-drink

create_addon now also writes a summary when log writing is used.
This commit is contained in:
Christian Hewitt 2018-08-25 10:58:22 +04:00 committed by GitHub
commit 198df11d49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -238,6 +238,7 @@ addons_drop=""
show_only="false" show_only="false"
write_logs="no" write_logs="no"
log_path="$BUILD/logs" log_path="$BUILD/logs"
summary_file="/dev/null"
export BUILD_INDENT=$((${BUILD_INDENT:-1}+$BUILD_INDENT_SIZE)) export BUILD_INDENT=$((${BUILD_INDENT:-1}+$BUILD_INDENT_SIZE))
# read addons from parameter list # read addons from parameter list
@ -264,6 +265,8 @@ case "$write_logs" in
esac esac
if [ -n "$log_path" ]; then if [ -n "$log_path" ]; then
mkdir -p "$log_path" mkdir -p "$log_path"
summary_file="$log_path/addon-summary.log"
rm -f $summary_file
fi fi
# check environment and create toolchain # check environment and create toolchain
@ -301,10 +304,12 @@ for addon in $(tr " " "\n" <<< $addons | sort -u); do
if [ ${PIPESTATUS[0]} != 0 ]; then if [ ${PIPESTATUS[0]} != 0 ]; then
addons_failed+="$addon " addons_failed+="$addon "
printf "$(print_color CLR_ERROR "ADDON FAILED $addon")\n" ' '>&$SILENT_OUT printf "$(print_color CLR_ERROR "ADDON FAILED $addon")\n" ' '>&$SILENT_OUT
echo "failed: ${addon}" >> $summary_file
else else
if [ "$remove_success_logs" = "true" ]; then if [ "$remove_success_logs" = "true" ]; then
rm -f $log_file rm -f $log_file
fi fi
echo "success: ${addon}" >> $summary_file
fi fi
done done