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: install:
- ps: if (Test-Path Env:\CYG_ROOT) { Start-FileDownload "http://cygwin.com/$env:CYG_SETUP" -FileName "cygsetup.exe" -Timeout 30000 } - 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 } - 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: build_script:
- if defined BASH (%BASH% -lc "cd $(cygpath ${APPVEYOR_BUILD_FOLDER}) && dos2unix build.sh && sh build.sh") - 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 - xcopy %APPVEYOR_BUILD_FOLDER%\Enhancement %APPVEYOR_BUILD_FOLDER%\AppVeyor /E /I /Q

View File

@ -1,39 +1,45 @@
#!/bin/bash #!/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 baseOutDir=$1
if [ -n "$baseOutDir" ]; then if [ -n "$baseOutDir" ]; then
if [ ! -d "$baseOutDir" ]; then if [ ! -d "$baseOutDir" ]; then
echo "Making base output directory $baseOutDir" echo -e "${GREEN}Making base output directory ${BGREEN}$baseOutDir\n"
mkdir "$baseOutDir" mkdir "$baseOutDir"
fi fi
fi fi
build_dir () { build_dir () {
srcDir=$1 srcDir=$1
dstDir=$2 dstDir=$2
if [ -n "$baseOutDir" ]; then if [ -n "$baseOutDir" ]; then
dstDir="$baseOutDir/$dstDir" dstDir="$baseOutDir/$dstDir"
fi fi
params=( "$@" )
rest=( "${params[@]:2}" )
params=( "$@" ) if [ ! -d "$dstDir" ]; then
rest=( "${params[@]:2}" ) mkdir -p "$dstDir"
else
rm "$dstDir"/*.txt
fi
if [ ! -d "$dstDir" ]; then for f in "$srcDir"/*.txt
echo "Making output directory $dstDir" do
mkdir -p "$dstDir" filename=`basename $f`
else outName="$dstDir/$filename"
rm "$dstDir"/*.txt #echo "Building $f to $outName with params ${rest[@]}"
fi php "$f" "${rest[@]}" > "$outName"
for f in "$srcDir"/*.txt if [ $? -ne 0 ]; then
do rm "$outName"
filename=`basename $f` fi
outName="$dstDir/$filename" done
echo "Building $f to $outName with params ${rest[@]}"
php "$f" "${rest[@]}" > "$outName"
if [ $? -ne 0 ]; then
rm "$outName"
fi
done
} }
res_360p=( "Performance" 640 360 ) res_360p=( "Performance" 640 360 )
@ -57,7 +63,7 @@ std_respack () {
params=( "$@" ) params=( "$@" )
rest=( "${params[@]:1}" ) rest=( "${params[@]:1}" )
#echo "std_respack $gameName" echo -e "${GREEN}[Building] ${BCYAN}$gameName ${NC}to ${params[@]:1}"
for arrg in "${rest[@]}" for arrg in "${rest[@]}"
do do
resvarname="res_${arrg}[@]" resvarname="res_${arrg}[@]"
@ -77,7 +83,7 @@ std_respack () {
#echo "$arrg w: $width h: $height inFolder: $inFolder outFolder: $outFolder" #echo "$arrg w: $width h: $height inFolder: $inFolder outFolder: $outFolder"
build_dir "$inFolder" "$outFolder" "${subparams[@]}" build_dir "$inFolder" "$outFolder" "${subparams[@]}"
elif [ -n "$arrg" ]; then #only if requested resolution name not empty (which happens when you remove array elem naively) 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 exit 1
fi fi
done done
@ -119,3 +125,4 @@ std_respack "WindWakerHD" "${res16by9[@]/$just1080p}" "${res21by9[@]}"
std_respack "Wonderful101" "${res16by9[@]/$just720p}" std_respack "Wonderful101" "${res16by9[@]/$just720p}"
std_respack "WoollyWorld" "${res16by9[@]/$just720p}" "${res21by9[@]}" std_respack "WoollyWorld" "${res16by9[@]/$just720p}" "${res21by9[@]}"
std_respack "XenobladeX" "${res16by9[@]/$just720p}" "${res21by9[@]}" std_respack "XenobladeX" "${res16by9[@]/$just720p}" "${res21by9[@]}"
echo -e "${NC}"