mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Further simplify activation and complete feedback to user
This commit is contained in:
parent
32081adc59
commit
d5552eaa01
@ -10,7 +10,7 @@ if [[ -n "$UNITY_LICENSE" ]]; then
|
|||||||
# * See for more details: https://gitlab.com/gableroux/unity3d-gitlab-ci-example/issues/5#note_72815478
|
# * See for more details: https://gitlab.com/gableroux/unity3d-gitlab-ci-example/issues/5#note_72815478
|
||||||
#
|
#
|
||||||
# The license file can be acquired using `webbertakken/request-manual-activation-file` action.
|
# The license file can be acquired using `webbertakken/request-manual-activation-file` action.
|
||||||
LICENSE_MODE="personal"
|
echo "Requesting activation (personal license)"
|
||||||
|
|
||||||
# Set the license file path
|
# Set the license file path
|
||||||
FILE_PATH=UnityLicenseFile.ulf
|
FILE_PATH=UnityLicenseFile.ulf
|
||||||
@ -19,7 +19,6 @@ if [[ -n "$UNITY_LICENSE" ]]; then
|
|||||||
echo "$UNITY_LICENSE" | tr -d '\r' > $FILE_PATH
|
echo "$UNITY_LICENSE" | tr -d '\r' > $FILE_PATH
|
||||||
|
|
||||||
# Activate license
|
# Activate license
|
||||||
echo "Requesting activation"
|
|
||||||
ACTIVATION_OUTPUT=$(xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
|
ACTIVATION_OUTPUT=$(xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
|
||||||
/opt/Unity/Editor/Unity \
|
/opt/Unity/Editor/Unity \
|
||||||
-batchmode \
|
-batchmode \
|
||||||
@ -56,8 +55,9 @@ elif [[ -n "$UNITY_SERIAL" && -n "$UNITY_EMAIL" && -n "$UNITY_PASSWORD" ]]; then
|
|||||||
#
|
#
|
||||||
# Note: This is the preferred way for PROFESSIONAL LICENSES.
|
# Note: This is the preferred way for PROFESSIONAL LICENSES.
|
||||||
#
|
#
|
||||||
LICENSE_MODE="professional"
|
echo "Requesting activation (professional license)"
|
||||||
|
|
||||||
|
# Activate license
|
||||||
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
|
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
|
||||||
/opt/Unity/Editor/Unity \
|
/opt/Unity/Editor/Unity \
|
||||||
-batchmode \
|
-batchmode \
|
||||||
@ -92,10 +92,10 @@ fi
|
|||||||
#
|
#
|
||||||
if [ $UNITY_EXIT_CODE -eq 0 ]; then
|
if [ $UNITY_EXIT_CODE -eq 0 ]; then
|
||||||
# Activation was a success
|
# Activation was a success
|
||||||
echo "Activation ($LICENSE_MODE) complete."
|
echo "Activation complete."
|
||||||
else
|
else
|
||||||
# Activation failed so exit with the code from the license verification step
|
# Activation failed so exit with the code from the license verification step
|
||||||
echo "Unclassified error occured while trying to activate ($LICENSE_MODE) license."
|
echo "Unclassified error occured while trying to activate license."
|
||||||
echo "Exit code was: $UNITY_EXIT_CODE"
|
echo "Exit code was: $UNITY_EXIT_CODE"
|
||||||
exit $UNITY_EXIT_CODE
|
exit $UNITY_EXIT_CODE
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user