mirror of
https://github.com/game-ci/unity-activate
synced 2026-01-29 06:20:06 +08:00
Cleanup unnecessary parts
This commit is contained in:
@@ -9,21 +9,13 @@ if [[ -n "$UNITY_LICENSE" ]]; then
|
|||||||
# Note that this is the ONLY WAY for PERSONAL LICENSES in 2019.
|
# Note that this is the ONLY WAY for PERSONAL LICENSES in 2019.
|
||||||
# * 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 in two possible ways:
|
# The license file can be acquired using `webbertakken/request-manual-activation-file` action.
|
||||||
# * Utilize `webbertakken/unity-actions/request-manual-activation-file`
|
|
||||||
# * Copy from your local machine (may be unstable due to different server specs)
|
|
||||||
# - Windows: C:/ProgramData/Unity/Unity_lic.ulf
|
|
||||||
# - MacOS: /Library/Application Support/Unity/Unity_lic.ulf
|
|
||||||
# - Linux: -
|
|
||||||
#
|
|
||||||
# CLI arguments reference: https://docs.unity3d.com/Manual/CommandLineArguments.html
|
|
||||||
|
|
||||||
# Set the license file path
|
# Set the license file path
|
||||||
FILE_PATH=UnityLicenseFile.ulf
|
FILE_PATH=UnityLicenseFile.ulf
|
||||||
|
|
||||||
# Copy license file from Github variables
|
# Copy license file from Github variables
|
||||||
echo "$UNITY_LICENSE" | tr -d '\r' > $FILE_PATH
|
echo "$UNITY_LICENSE" | tr -d '\r' > $FILE_PATH
|
||||||
echo "$UNITY_LICENSE" | tr -d '\r' > /root/.local/share/unity3d/Unity/Unity_lic.ulf
|
|
||||||
|
|
||||||
##
|
##
|
||||||
## Activate license
|
## Activate license
|
||||||
@@ -58,28 +50,19 @@ if [[ -n "$UNITY_LICENSE" ]]; then
|
|||||||
|
|
||||||
# Display information about the result
|
# Display information about the result
|
||||||
if [ $UNITY_EXIT_CODE -eq 0 ]; then
|
if [ $UNITY_EXIT_CODE -eq 0 ]; then
|
||||||
echo "Activation complete"
|
echo "Activation (personal) complete."
|
||||||
else
|
else
|
||||||
echo "Unclassified error occured while trying to activate license"
|
echo "Unclassified error occured while trying to activate (personal) license."
|
||||||
echo "Exit code was: $UNITY_EXIT_CODE"
|
echo "Exit code was: $UNITY_EXIT_CODE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Remove license file
|
||||||
|
rm -f $FILE_PATH
|
||||||
|
|
||||||
# Exit with the code from the license verification step
|
# Exit with the code from the license verification step
|
||||||
exit $UNITY_EXIT_CODE
|
exit $UNITY_EXIT_CODE
|
||||||
|
|
||||||
else
|
else
|
||||||
#
|
|
||||||
# TODO - Remove any debugging below
|
|
||||||
#
|
|
||||||
|
|
||||||
# Figure out which files were added
|
|
||||||
printf "\n\n./(entry folder)\n\n"
|
|
||||||
ls -alh
|
|
||||||
printf "\n\n/root/.local/share/unity3d\n\n"
|
|
||||||
ls -Ralph /root/.local/share/unity3d
|
|
||||||
printf "\n\n/opt/Unity/Editor/\n\n"
|
|
||||||
ls -alh /opt/Unity/Editor/
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# PROFESSIONAL (SERIAL) LICENSE MODE
|
# PROFESSIONAL (SERIAL) LICENSE MODE
|
||||||
#
|
#
|
||||||
@@ -97,21 +80,18 @@ else
|
|||||||
-username "$UNITY_EMAIL" \
|
-username "$UNITY_EMAIL" \
|
||||||
-password "$UNITY_PASSWORD"
|
-password "$UNITY_PASSWORD"
|
||||||
|
|
||||||
#
|
# Store the exit code from the verify command
|
||||||
# Export the activation instance
|
UNITY_EXIT_CODE=$?
|
||||||
#
|
|
||||||
# TODO - Remove any debugging below
|
|
||||||
#
|
|
||||||
|
|
||||||
# Figure out which files were added
|
# Display information about the result
|
||||||
printf "\n\n./(entry folder)\n\n"
|
if [ $UNITY_EXIT_CODE -eq 0 ]; then
|
||||||
ls -alh
|
echo "Activation (professional) complete."
|
||||||
printf "\n\n/root/.local/share/unity3d\n\n"
|
else
|
||||||
ls -Ralph /root/.local/share/unity3d
|
echo "Unclassified error occured while trying to activate (professional) license."
|
||||||
printf "\n\n/opt/Unity/Editor/\n\n"
|
echo "Exit code was: $UNITY_EXIT_CODE"
|
||||||
ls -alh /opt/Unity/Editor/
|
fi
|
||||||
|
|
||||||
|
# Exit with the code from the license verification step
|
||||||
|
exit $UNITY_EXIT_CODE
|
||||||
|
|
||||||
# Set resulting file as output
|
|
||||||
# RECEIVED_ACTIVATION="$(<figureOutWhichFileWeNeed)"
|
|
||||||
# echo "::set-env name=ACTIVATION_INSTANCE::$RECEIVED_ACTIVATION"
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user