Shortened and Colorized Appveyor output (#120)

* Console output compacted and colorized
The installation info took too many lines and won't be revamped while working great as is, so I'd think that it's better to supress any logging. The quiet-mode of the installation doesn't really seem to work either.

The installation part that sometimes errors is irrelevant to the part I've suppressed.
This commit is contained in:
Milan 2017-10-19 23:22:18 +02:00 committed by GitHub
parent b57325dee4
commit 2eb4360922
2 changed files with 38 additions and 30 deletions

View File

@ -33,7 +33,8 @@ init:
install:
- ps: if (Test-Path Env:\CYG_ROOT) { Start-FileDownload "http://cygwin.com/$env:CYG_SETUP" -FileName "cygsetup.exe" -Timeout 30000 }
- ps: if ((Get-Content "cygsetup.exe") -eq $Null) { Copy-Item "$env:CYG_SETUP" -Destination "cygsetup.exe" -Force } else { Copy-Item "cygsetup.exe" -Destination "$env:CYG_SETUP" -Force }
- if defined CYG_ROOT (%CYG_SETUP% --quiet-mode --no-shortcuts --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --packages "%CYG_PACKAGES%" --upgrade-also)
# Quiet-mode isn't really working but this does work.
- if defined CYG_ROOT ((%CYG_SETUP% --quiet-mode --no-shortcuts --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --packages "%CYG_PACKAGES%" --upgrade-also) > $null)
build_script:
- if defined BASH (%BASH% -lc "cd $(cygpath ${APPVEYOR_BUILD_FOLDER}) && dos2unix build.sh && sh build.sh")
- xcopy %APPVEYOR_BUILD_FOLDER%\Enhancement %APPVEYOR_BUILD_FOLDER%\AppVeyor /E /I /Q

View File

@ -1,8 +1,15 @@
#!/bin/bash
BGREEN='\033[1;32m'
GREEN='\033[0;32m'
BCYAN='\033[1;36m'
RED='\033[0;31m'
NC='\033[0m' # Removes Color
baseOutDir=$1
if [ -n "$baseOutDir" ]; then
if [ ! -d "$baseOutDir" ]; then
echo "Making base output directory $baseOutDir"
echo -e "${GREEN}Making base output directory ${BGREEN}$baseOutDir\n"
mkdir "$baseOutDir"
fi
fi
@ -13,12 +20,10 @@ build_dir () {
if [ -n "$baseOutDir" ]; then
dstDir="$baseOutDir/$dstDir"
fi
params=( "$@" )
rest=( "${params[@]:2}" )
if [ ! -d "$dstDir" ]; then
echo "Making output directory $dstDir"
mkdir -p "$dstDir"
else
rm "$dstDir"/*.txt
@ -28,8 +33,9 @@ build_dir () {
do
filename=`basename $f`
outName="$dstDir/$filename"
echo "Building $f to $outName with params ${rest[@]}"
#echo "Building $f to $outName with params ${rest[@]}"
php "$f" "${rest[@]}" > "$outName"
if [ $? -ne 0 ]; then
rm "$outName"
fi
@ -57,7 +63,7 @@ std_respack () {
params=( "$@" )
rest=( "${params[@]:1}" )
#echo "std_respack $gameName"
echo -e "${GREEN}[Building] ${BCYAN}$gameName ${NC}to ${params[@]:1}"
for arrg in "${rest[@]}"
do
resvarname="res_${arrg}[@]"
@ -77,7 +83,7 @@ std_respack () {
#echo "$arrg w: $width h: $height inFolder: $inFolder outFolder: $outFolder"
build_dir "$inFolder" "$outFolder" "${subparams[@]}"
elif [ -n "$arrg" ]; then #only if requested resolution name not empty (which happens when you remove array elem naively)
echo "$arrg resolution not defined, define it in build.sh"
echo -e "${RED}$arrg resolution not defined, define it in build.sh"
exit 1
fi
done
@ -119,3 +125,4 @@ std_respack "WindWakerHD" "${res16by9[@]/$just1080p}" "${res21by9[@]}"
std_respack "Wonderful101" "${res16by9[@]/$just720p}"
std_respack "WoollyWorld" "${res16by9[@]/$just720p}" "${res21by9[@]}"
std_respack "XenobladeX" "${res16by9[@]/$just720p}" "${res21by9[@]}"
echo -e "${NC}"