Skip to content

Commit

Permalink
Final Changes to build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
BraedonWooding authored Feb 17, 2019
1 parent c4e8e30 commit bd2b20c
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions Scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
#! /bin/sh

PROJECT_PATH=$(pwd)/$UNITY_PROJECT_PATH
UNITY_BUILD_DIR=$(pwd)/Build

ERROR_CODE=0
echo "Items in project path ($PROJECT_PATH):"
ls "$PROJECT_PATH"

echo "Attempting to build $project for Windows"
/Applications/Unity/Unity.app/Contents/MacOS/Unity \
-batchmode \
-nographics \
-silent-crashes \
-logFile $(pwd)/unity.log \
-projectPath $(pwd) \
-buildWindowsPlayer "$(pwd)/Build/windows/$project.exe" \
-buildWindowsPlayer "$(pwd)/Build/windows/ProjectPorcupine.exe" \
-quit

cat $(pwd)/unity.log

if [ $? = 0 ] ; then
echo "Building Windows exe completed successfully."
else
Expand All @@ -33,10 +24,8 @@ echo "Attempting to build $project for OS X"
-silent-crashes \
-logFile $(pwd)/unity.log \
-projectPath $(pwd) \
-buildOSXUniversalPlayer "$(pwd)/Build/osx/$project.app" \
-buildOSXUniversalPlayer "$(pwd)/Build/osx/ProjectPorcupine.app" \
-quit

cat $(pwd)/unity.log

if [ $? = 0 ] ; then
echo "Building Mac exe completed successfully."
Expand All @@ -52,11 +41,9 @@ echo "Attempting to build $project for Linux"
-silent-crashes \
-logFile $(pwd)/unity.log \
-projectPath $(pwd) \
-buildLinuxUniversalPlayer "$(pwd)/Build/linux/$project.exe" \
-buildLinuxUniversalPlayer "$(pwd)/Build/linux/ProjectPorcupine.exe" \
-quit

cat $(pwd)/unity.log

if [ $? = 0 ] ; then
echo "Building Linux exe completed successfully."
else
Expand All @@ -65,7 +52,7 @@ else
exit $?
fi

echo 'Attempting to zip builds for week $BUILD_VERSION'
echo "Attempting to zip builds for week $BUILD_VERSION"
cd $(pwd)/Build/
echo 'Attempting to zip linux'
zip -q -r Linux-$BUILD_VERSION.zip linux/
Expand Down

0 comments on commit bd2b20c

Please sign in to comment.