fix line endings
This commit is contained in:
parent
6290dde9db
commit
a160eddf59
90
ci/build.sh
90
ci/build.sh
|
@ -1,47 +1,43 @@
|
||||||
# osx unity build shell script
|
# osx unity build shell script
|
||||||
|
|
||||||
# $1 UNITY_VERSION
|
# $1 UNITY_VERSION
|
||||||
unityversion=$1
|
unityversion=$1
|
||||||
|
|
||||||
editorlogpath="$HOME/Library/Logs/Unity/Editor.log"
|
editorlogpath="$HOME/Library/Logs/Unity/Editor.log"
|
||||||
editorpath="/Applications/Unity/Hub/Editor/$unityversion/Unity.app"
|
editorpath="/Applications/Unity/Hub/Editor/$unityversion/Unity.app"
|
||||||
|
|
||||||
# find and kill existing unity instances
|
# find and kill existing unity instances
|
||||||
if pgrep -x Unity
|
if pgrep -x Unity
|
||||||
then
|
then
|
||||||
echo "terminating existing unity processes..."
|
echo "terminating existing unity processes..."
|
||||||
kill $(pgrep Unity)
|
kill $(pgrep Unity)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# remove previous Editor.log
|
# remove previous Editor.log
|
||||||
echo "removing previous editor log..."
|
echo "removing previous editor log..."
|
||||||
[ -f $editorlogpath ] && rm $editorlogpath
|
[ -f $editorlogpath ] && rm $editorlogpath
|
||||||
|
|
||||||
echo "starting build using unity v$unityversion..."
|
echo "starting build using unity v$unityversion..."
|
||||||
|
|
||||||
# launch unity in batch mode
|
# launch unity in batch mode
|
||||||
open -g $editorpath --args \
|
open -g $editorpath --args \
|
||||||
-batchmode \
|
-batchmode \
|
||||||
-quit \
|
-quit \
|
||||||
-nographics \
|
-nographics \
|
||||||
-executeMethod "Ktyl.Util.BuildCommand.Run" \
|
-executeMethod "Ktyl.Util.BuildCommand.Run" \
|
||||||
-logFile $editorlogpath \
|
-logFile $editorlogpath \
|
||||||
-projectPath "$(pwd)/game"
|
-projectPath "$(pwd)/game"
|
||||||
|
|
||||||
# wait for unity to exit
|
# wait for unity to exit
|
||||||
while pgrep -x Unity > /dev/null
|
while pgrep -x Unity > /dev/null
|
||||||
do
|
do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -f $editorlogpath ]; then
|
if [ -f $editorlogpath ]; then
|
||||||
echo "build completed, dumping log"
|
echo "build completed, dumping log"
|
||||||
cat $editorlogpath
|
cat $editorlogpath
|
||||||
echo "TODO: check result of build by looking at the last few lines"
|
echo "TODO: check result of build by looking at the last few lines"
|
||||||
else
|
else
|
||||||
echo "no editor log to dump?"
|
echo "no editor log to dump?"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue