Skip to content

Commit

Permalink
Improve license checks
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewKahr committed Nov 8, 2023
1 parent e8e39d7 commit d362051
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dist/platforms/mac/steps/activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ echo "Requesting activation"
# Store the exit code from the verify command
UNITY_EXIT_CODE=$?

if [ ! -f "/Library/Application Support/Unity/Unity_lic.ulf" ]; then
echo "::error ::There was an error while trying to activate the Unity license."
fi

#
# Display information about the result
#
Expand Down
6 changes: 5 additions & 1 deletion dist/platforms/ubuntu/steps/activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ if [[ -n "$UNITY_SERIAL" && -n "$UNITY_EMAIL" && -n "$UNITY_PASSWORD" ]]; then
# Store the exit code from the verify command
UNITY_EXIT_CODE=$?

if [ ! -f "~/.local/share/unity3d/Unity/Unity_lic.ulf" ]; then
echo "::error ::There was an error while trying to activate the Unity license."
fi

elif [[ -n "$UNITY_LICENSING_SERVER" ]]; then
#
# Custom Unity License Server
Expand All @@ -50,6 +54,7 @@ else
echo "Visit https://game.ci/docs/github/getting-started for more"
echo "details on how to set up one of the possible activation strategies."

echo "::error ::No valid license activation strategy could be determined."
# Immediately exit as no UNITY_EXIT_CODE can be derrived.
exit 1;

Expand All @@ -65,7 +70,6 @@ else
# Activation failed so exit with the code from the license verification step
echo "Unclassified error occured while trying to activate license."
echo "Exit code was: $UNITY_EXIT_CODE"
echo "::error ::There was an error while trying to activate the Unity license."
exit $UNITY_EXIT_CODE
fi

Expand Down

0 comments on commit d362051

Please sign in to comment.