mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Simplify BUILD_METHOD selection, fix derp
This commit is contained in:
parent
bda25a9cc1
commit
bed2573f99
@ -57,25 +57,32 @@ CURRENT_BUILD_FULL_PATH=$BUILDS_FULL_PATH/$BUILD_TARGET
|
|||||||
# The method must be declared static and placed in project/Assets/Editor
|
# The method must be declared static and placed in project/Assets/Editor
|
||||||
#
|
#
|
||||||
|
|
||||||
if [ -n "$BUILD_METHOD" ]; then
|
if [ -z "$BUILD_METHOD" ]; then
|
||||||
# User has provided their own build method.
|
|
||||||
#
|
|
||||||
# Assume they also bring their own script; simply reference it.
|
|
||||||
#
|
|
||||||
EXECUTE_BUILD_METHOD="-executeMethod $BUILD_METHOD"
|
|
||||||
#
|
|
||||||
else
|
|
||||||
# User has not provided their own build command.
|
# User has not provided their own build command.
|
||||||
#
|
#
|
||||||
# Use the script from this action which builds the scenes that are enabled in
|
# Use the script from this action which builds the scenes that are enabled in
|
||||||
# the project.
|
# the project.
|
||||||
#
|
#
|
||||||
cp -r /UnityBuilderAction $CURRENT_BUILD_PATH/Assets/Editor/
|
# Create Editor directory if it does not exist
|
||||||
EXECUTE_BUILD_METHOD="-executeMethod UnityBuilderAction.Builder.BuildProject"
|
mkdir -p $UNITY_PROJECT_PATH/Assets/Editor/
|
||||||
ls -Ralph $CURRENT_BUILD_PATH/Assets/Editor/
|
# Copy the build script of Unity Builder action
|
||||||
|
cp -r /UnityBuilderAction $UNITY_PROJECT_PATH/Assets/Editor/
|
||||||
|
# Set the Build method to that of UnityBuilder Action
|
||||||
|
BUILD_METHOD="UnityBuilderAction.Builder.BuildProject"
|
||||||
|
# Verify recursive paths
|
||||||
|
ls -Ralph $UNITY_PROJECT_PATH/Assets/Editor/
|
||||||
|
#
|
||||||
|
else
|
||||||
|
# User has provided their own build method.
|
||||||
|
# Assume they also bring their own script.
|
||||||
|
#
|
||||||
|
echo "User set build method to $BUILD_METHOD."
|
||||||
#
|
#
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set build method to execute as flag + argument
|
||||||
|
EXECUTE_BUILD_METHOD="-executeMethod $BUILD_METHOD"
|
||||||
|
|
||||||
|
|
||||||
# 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
|
||||||
|
Loading…
Reference in New Issue
Block a user