Created
November 21, 2016 21:48
-
-
Save lordcodes/7a1b781f595e964790147c3da3a2c654 to your computer and use it in GitHub Desktop.
Script to build your Unity project, written for use on Travis.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
project_path=$(pwd)/src/NAME_OF_PROJECT | |
log_file=$(pwd)/build/unity-mac.log | |
error_code=0 | |
echo "Building project for Mac OS." | |
/Applications/Unity/Unity.app/Contents/MacOS/Unity \ | |
-batchmode \ | |
-nographics \ | |
-silent-crashes \ | |
-logFile "$log_file" \ | |
-projectPath "$project_path" \ | |
-buildOSXUniversalPlayer "$(pwd)/build/osx/ci-build.app" \ | |
-quit | |
if [ $? = 0 ] ; then | |
echo "Building Mac OS completed successfully." | |
error_code=0 | |
else | |
echo "Building Mac OS failed. Exited with $?." | |
error_code=1 | |
fi | |
echo 'Build logs:' | |
cat $log_file | |
echo "Finishing with code $error_code" | |
exit $error_code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment