From a160eddf594b54becb264ef02706e374f39d0869 Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Sat, 30 Jan 2021 14:18:47 +0000 Subject: [PATCH] fix line endings --- ci/build.sh | 90 +++++++++++++++++++++++++---------------------------- 1 file changed, 43 insertions(+), 47 deletions(-) diff --git a/ci/build.sh b/ci/build.sh index 5c415a2..7a5fb82 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -1,47 +1,43 @@ -# osx unity build shell script - -# $1 UNITY_VERSION -unityversion=$1 - -editorlogpath="$HOME/Library/Logs/Unity/Editor.log" -editorpath="/Applications/Unity/Hub/Editor/$unityversion/Unity.app" - -# find and kill existing unity instances -if pgrep -x Unity -then - echo "terminating existing unity processes..." - kill $(pgrep Unity) -fi - -# remove previous Editor.log -echo "removing previous editor log..." -[ -f $editorlogpath ] && rm $editorlogpath - -echo "starting build using unity v$unityversion..." - -# launch unity in batch mode -open -g $editorpath --args \ - -batchmode \ - -quit \ - -nographics \ - -executeMethod "Ktyl.Util.BuildCommand.Run" \ - -logFile $editorlogpath \ - -projectPath "$(pwd)/game" - -# wait for unity to exit -while pgrep -x Unity > /dev/null -do - sleep 1 -done - -if [ -f $editorlogpath ]; then - echo "build completed, dumping log" - cat $editorlogpath - echo "TODO: check result of build by looking at the last few lines" -else - echo "no editor log to dump?" -fi - - - - +# osx unity build shell script + +# $1 UNITY_VERSION +unityversion=$1 + +editorlogpath="$HOME/Library/Logs/Unity/Editor.log" +editorpath="/Applications/Unity/Hub/Editor/$unityversion/Unity.app" + +# find and kill existing unity instances +if pgrep -x Unity +then + echo "terminating existing unity processes..." + kill $(pgrep Unity) +fi + +# remove previous Editor.log +echo "removing previous editor log..." +[ -f $editorlogpath ] && rm $editorlogpath + +echo "starting build using unity v$unityversion..." + +# launch unity in batch mode +open -g $editorpath --args \ + -batchmode \ + -quit \ + -nographics \ + -executeMethod "Ktyl.Util.BuildCommand.Run" \ + -logFile $editorlogpath \ + -projectPath "$(pwd)/game" + +# wait for unity to exit +while pgrep -x Unity > /dev/null +do + sleep 1 +done + +if [ -f $editorlogpath ]; then + echo "build completed, dumping log" + cat $editorlogpath + echo "TODO: check result of build by looking at the last few lines" +else + echo "no editor log to dump?" +fi