From f2032d6b94eb9dbf30b653e12041f2499363d777 Mon Sep 17 00:00:00 2001 From: Jon Manning Date: Mon, 31 Jul 2017 16:19:24 +1000 Subject: [PATCH] Fix up package.sh. Unity changed their version numbering scheme, and the previous method of finding the version number incorrectly thinks 5.6 is newer than 2017.1. Hard-coded the path for now. --- package.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/package.sh b/package.sh index 0e65bf839..50d8255e3 100755 --- a/package.sh +++ b/package.sh @@ -24,7 +24,6 @@ LOGFILE="export.log" OUTDIR="$(pwd)/Builds" -SOURCE_FILES="YarnSpinner/*.cs" NO_EXAMPLES=0 @@ -94,7 +93,7 @@ fi # Build the Yarn Spinner DLL echo "Building Yarn Spinner..." -./build.sh +./build.sh -b if [ $SOURCE_BUILD == 1 ]; then echo "Removing YarnSpinner.dll..." @@ -103,7 +102,7 @@ if [ $SOURCE_BUILD == 1 ]; then echo "Copying Yarn Spinner source in..." # Copy the source files in - cp -v "$SOURCE_FILES" "Unity/Assets/YarnSpinner/Code/" + cp -v YarnSpinner/*.cs "Unity/Assets/YarnSpinner/Code/" fi @@ -152,20 +151,20 @@ echo "Packaging Version $FULL_VERSION with Unity..." OUTFILE="$OUTDIR/YarnSpinner-$FULL_VERSION.unitypackage" -# Find where Unity is installed; filter out any copies that include "b[num]" -# (that is, beta versions); sort it to put the latest version name at the end, -# then pick the last one -UNITY="$(mdfind "kind:application Unity.app" | grep -vE "b[0-9]+" | sort | tail -n 1)/Contents/MacOS/Unity" +UNITY="/Applications/Unity 2017.1.0f3/Unity.app" +UNITY_BINARY="$UNITY/Contents/MacOS/Unity" -if [[ -f $UNITY ]]; then +if [[ -f $UNITY_BINARY ]]; then echo "Using $UNITY" ASSET_PATH="Assets/YarnSpinner" # Disable stop-on-error for this - we want better reporting set +e + + - "$UNITY" -batchmode -projectPath "$(pwd)/Unity" -logFile $LOGFILE -exportPackage "$ASSET_PATH" "$OUTFILE" -quit + "$UNITY_BINARY" -batchmode -projectPath "$(pwd)/Unity" -logFile $LOGFILE -exportPackage "$ASSET_PATH" "$OUTFILE" -quit if [ $? -ne 0 ]; then