diff --git a/dist/platforms/mac/steps/return_license.sh b/dist/platforms/mac/steps/return_license.sh index 1749f9e7..5ff44768 100755 --- a/dist/platforms/mac/steps/return_license.sh +++ b/dist/platforms/mac/steps/return_license.sh @@ -4,15 +4,25 @@ echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory." pushd "$ACTIVATE_LICENSE_PATH" -/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS/Unity \ - -logFile - \ - -batchmode \ - -nographics \ - -quit \ - -username "$UNITY_EMAIL" \ - -password "$UNITY_PASSWORD" \ - -returnlicense \ - -projectPath "$ACTIVATE_LICENSE_PATH" -# Return to previous working directory +if [[ -n "$UNITY_LICENSING_SERVER" ]]; then # + # + # Return any floating license used. + # + echo "Returning floating license: \"$FLOATING_LICENSE\"" + /Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/Frameworks/UnityLicensingClient.app/Contents/MacOS/Unity.Licensing.Client --return-floating "$FLOATING_LICENSE" +else + /Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS/Unity \ + -logFile - \ + -batchmode \ + -nographics \ + -quit \ + -username "$UNITY_EMAIL" \ + -password "$UNITY_PASSWORD" \ + -returnlicense \ + -projectPath "$ACTIVATE_LICENSE_PATH" + + # Return to previous working directory +fi + popd