mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Include default-build-script in docker
This commit is contained in:
parent
35e88ac302
commit
c8b1b80829
@ -4,3 +4,4 @@
|
|||||||
# Files required for the action
|
# Files required for the action
|
||||||
!entrypoint.sh
|
!entrypoint.sh
|
||||||
!action.yml
|
!action.yml
|
||||||
|
!default-build-script
|
||||||
|
@ -9,6 +9,7 @@ LABEL "repository"="http://github.com/webbertakken/unity-actions"
|
|||||||
LABEL "homepage"="http://github.com/webbertakken/unity-actions"
|
LABEL "homepage"="http://github.com/webbertakken/unity-actions"
|
||||||
LABEL "maintainer"="Webber Takken <webber@takken.io>"
|
LABEL "maintainer"="Webber Takken <webber@takken.io>"
|
||||||
|
|
||||||
|
ADD default-build-script /UnityBuilderAction
|
||||||
ADD entrypoint.sh /entrypoint.sh
|
ADD entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
@ -47,21 +47,32 @@ CURRENT_BUILD_PATH=$BUILDS_PATH/$BUILD_TARGET
|
|||||||
CURRENT_BUILD_FULL_PATH=$BUILDS_FULL_PATH/$BUILD_TARGET
|
CURRENT_BUILD_FULL_PATH=$BUILDS_FULL_PATH/$BUILD_TARGET
|
||||||
|
|
||||||
#
|
#
|
||||||
# Set the build command, must reference one of:
|
# Set the build method, must reference one of:
|
||||||
#
|
#
|
||||||
# - <NamespaceName.ClassName.MethodName>
|
# - <NamespaceName.ClassName.MethodName>
|
||||||
# - <ClassName.MethodName>
|
# - <ClassName.MethodName>
|
||||||
#
|
#
|
||||||
# For example: `BuildCommand.PerformBuild`
|
# For example: `BuildCommand.PerformBuild`
|
||||||
#
|
#
|
||||||
# The method must be defined static
|
# The method must be declared static and placed in project/Assets/Editor
|
||||||
#
|
#
|
||||||
|
|
||||||
if [ -z "$BUILD_COMMAND" ]; then
|
if [ -n "$BUILD_METHOD" ]; then
|
||||||
# TODO - copy Builder class from root
|
# User has provided their own build method.
|
||||||
EXECUTE_METHOD="-executeMethod Builder.BuildProject"
|
#
|
||||||
|
# Assume they also bring their own script; simply reference it.
|
||||||
|
#
|
||||||
|
EXECUTE_BUILD_METHOD="-executeMethod $BUILD_METHOD"
|
||||||
|
#
|
||||||
else
|
else
|
||||||
EXECUTE_METHOD="-executeMethod $BUILD_COMMAND"
|
# User has not provided their own build command.
|
||||||
|
#
|
||||||
|
# Use the script from this action which builds the scenes that are enabled in
|
||||||
|
# the project.
|
||||||
|
#
|
||||||
|
cp -r /UnityBuilderAction $CURRENT_BUILD_PATH/Assets/Editor/
|
||||||
|
EXECUTE_BUILD_METHOD="-executeMethod UnityBuilderAction.Builder.BuildProject"
|
||||||
|
#
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -116,7 +127,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_METHOD
|
$EXECUTE_BUILD_METHOD
|
||||||
|
|
||||||
# Catch exit code
|
# Catch exit code
|
||||||
BUILD_EXIT_CODE=$?
|
BUILD_EXIT_CODE=$?
|
||||||
|
Loading…
Reference in New Issue
Block a user