diff --git a/dist/platforms/mac/steps/activate.sh b/dist/platforms/mac/steps/activate.sh index 0451902b..45b6f87b 100755 --- a/dist/platforms/mac/steps/activate.sh +++ b/dist/platforms/mac/steps/activate.sh @@ -7,22 +7,25 @@ pushd "$ACTIVATE_LICENSE_PATH" echo "Requesting activation" if [[ -n "$UNITY_LICENSING_SERVER" ]]; then - # - # Custom Unity License Server - # - echo "Adding licensing server config" - mkdir -p "/Library/Application Support/Unity/config/" - cp "$ACTION_FOLDER/unity-config/services-config.json" "/Library/Application Support/Unity/config/services-config.json" - /Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/Frameworks/UnityLicensingClient.app/Contents/MacOS/Unity.Licensing.Client --acquire-floating > license.txt - PARSEDFILE=$(grep -oE '\".*?\"' < license.txt | tr -d '"') - grep -oE '\".*?\"' < license.txt - export FLOATING_LICENSE - FLOATING_LICENSE=$(sed -n 2p <<< "$PARSEDFILE") - FLOATING_LICENSE_TIMEOUT=$(sed -n 4p <<< "$PARSEDFILE") + # + # Custom Unity License Server + # + echo "Adding licensing server config" + mkdir -p "/Library/Application Support/Unity/config/" + cp \ + "$ACTION_FOLDER/unity-config/services-config.json" \ + "/Library/Application Support/Unity/config/services-config.json" + /Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/Frameworks/UnityLicensingClient.app/Contents/MacOS/Unity.Licensing.Client \ + --acquire-floating > license.txt + PARSEDFILE=$(grep -oE '\".*?\"' < license.txt | tr -d '"') + grep -oE '\".*?\"' < license.txt + export FLOATING_LICENSE + FLOATING_LICENSE=$(sed -n 2p <<< "$PARSEDFILE") + FLOATING_LICENSE_TIMEOUT=$(sed -n 4p <<< "$PARSEDFILE") - echo "Acquired floating license: \"$FLOATING_LICENSE\" with timeout $FLOATING_LICENSE_TIMEOUT" - # Store the exit code from the verify command - UNITY_EXIT_CODE=$? + echo "Acquired floating license: \"$FLOATING_LICENSE\" with timeout $FLOATING_LICENSE_TIMEOUT" + # Store the exit code from the verify command + UNITY_EXIT_CODE=$? else # Activate license /Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS/Unity \