mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Cleanup unneeded license code
This commit is contained in:
parent
14e59b6099
commit
0558bc6213
@ -1,11 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
#
|
|
||||||
# Set license file path
|
|
||||||
#
|
|
||||||
|
|
||||||
LICENSE_FILE_PATH=UnityLicenseFile.ulf
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Set project path
|
# Set project path
|
||||||
#
|
#
|
||||||
@ -23,14 +17,6 @@ fi
|
|||||||
#
|
#
|
||||||
# Set the builds target platform;
|
# Set the builds target platform;
|
||||||
#
|
#
|
||||||
# possible options are:
|
|
||||||
#
|
|
||||||
# Standalone, Win, Win64, OSXUniversal,
|
|
||||||
# Linux64, iOS, Android, WebGL, XboxOne,
|
|
||||||
# PS4, WindowsStoreApps, Switch, tvOS
|
|
||||||
#
|
|
||||||
# New options array:
|
|
||||||
#
|
|
||||||
# Web: WebGL
|
# Web: WebGL
|
||||||
# Desktop: StandaloneOSX, StandaloneWindows, StandaloneWindows64, StandaloneLinux64
|
# Desktop: StandaloneOSX, StandaloneWindows, StandaloneWindows64, StandaloneLinux64
|
||||||
# Console: PS4, XboxOne, Switch
|
# Console: PS4, XboxOne, Switch
|
||||||
@ -73,36 +59,11 @@ CURRENT_BUILD_FULL_PATH=$BUILDS_FULL_PATH/$BUILD_TARGET
|
|||||||
|
|
||||||
if [ -z "$BUILD_COMMAND" ]; then
|
if [ -z "$BUILD_COMMAND" ]; then
|
||||||
# TODO - copy Builder class from root
|
# TODO - copy Builder class from root
|
||||||
EXECUTE_CUSTOM_METHOD="-executeMethod Builder.BuildProject"
|
EXECUTE_METHOD="-executeMethod Builder.BuildProject"
|
||||||
else
|
else
|
||||||
EXECUTE_CUSTOM_METHOD="-executeMethod $BUILD_COMMAND"
|
EXECUTE_METHOD="-executeMethod $BUILD_COMMAND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
|
||||||
# Copy license file from Github variables
|
|
||||||
#
|
|
||||||
|
|
||||||
echo "$UNITY_LICENSE" | tr -d '\r' > $LICENSE_FILE_PATH
|
|
||||||
echo "$UNITY_LICENSE" | tr -d '\r' > /root/.local/share/unity3d/Unity/Unity_lic.ulf
|
|
||||||
# TODO - test if this line has any effect
|
|
||||||
echo "$UNITY_LICENSE" | tr -d '\r' > /root/.local/share/unity3d/Unity/Unity_v2019.x.ulf
|
|
||||||
|
|
||||||
#
|
|
||||||
# Activate license
|
|
||||||
#
|
|
||||||
|
|
||||||
echo "Requesting activation"
|
|
||||||
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
|
|
||||||
/opt/Unity/Editor/Unity \
|
|
||||||
-batchmode \
|
|
||||||
-nographics \
|
|
||||||
-logFile /dev/stdout \
|
|
||||||
-quit \
|
|
||||||
-manualLicenseFile $LICENSE_FILE_PATH
|
|
||||||
# This is expected to always exit with code 1 (both success and failure).
|
|
||||||
# Convert to exit code 0 by echoing the current exit code.
|
|
||||||
echo $?
|
|
||||||
# Exit code is now 0
|
|
||||||
|
|
||||||
# The build specification below may require Unity 2019.2.11f1 or later (not tested below).
|
# The build specification below may require Unity 2019.2.11f1 or later (not tested below).
|
||||||
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
|
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
|
||||||
@ -155,7 +116,7 @@ xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
|
|||||||
-buildTarget "$BUILD_TARGET" \
|
-buildTarget "$BUILD_TARGET" \
|
||||||
-customBuildTarget "$BUILD_TARGET" \
|
-customBuildTarget "$BUILD_TARGET" \
|
||||||
-customBuildPath "$CURRENT_BUILD_FULL_PATH" \
|
-customBuildPath "$CURRENT_BUILD_FULL_PATH" \
|
||||||
$EXECUTE_CUSTOM_METHOD
|
$EXECUTE_METHOD
|
||||||
|
|
||||||
# Catch exit code
|
# Catch exit code
|
||||||
BUILD_EXIT_CODE=$?
|
BUILD_EXIT_CODE=$?
|
||||||
|
Loading…
Reference in New Issue
Block a user