mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Allow custom parameters
This commit is contained in:
parent
b382ae9023
commit
7d51d12262
File diff suppressed because one or more lines are too long
@ -58,10 +58,15 @@ else
|
|||||||
# User has provided their own build method.
|
# User has provided their own build method.
|
||||||
# Assume they also bring their own script.
|
# Assume they also bring their own script.
|
||||||
#
|
#
|
||||||
echo "User set build method to $BUILD_METHOD."
|
echo "Using build method \"$BUILD_METHOD\"."
|
||||||
#
|
#
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Display custom parameters
|
||||||
|
#
|
||||||
|
echo "Using custom parameters \"$CUSTOM_PARAMETERS\"."
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
@ -103,7 +108,8 @@ xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
|
|||||||
-buildTarget "$BUILD_TARGET" \
|
-buildTarget "$BUILD_TARGET" \
|
||||||
-customBuildTarget "$BUILD_TARGET" \
|
-customBuildTarget "$BUILD_TARGET" \
|
||||||
-customBuildPath "$CUSTOM_BUILD_PATH" \
|
-customBuildPath "$CUSTOM_BUILD_PATH" \
|
||||||
-executeMethod "$BUILD_METHOD"
|
-executeMethod "$BUILD_METHOD" \
|
||||||
|
"$CUSTOM_PARAMETERS"
|
||||||
|
|
||||||
# Catch exit code
|
# Catch exit code
|
||||||
BUILD_EXIT_CODE=$?
|
BUILD_EXIT_CODE=$?
|
||||||
|
@ -9,6 +9,7 @@ class BuildParameters {
|
|||||||
buildName,
|
buildName,
|
||||||
buildsPath,
|
buildsPath,
|
||||||
buildMethod,
|
buildMethod,
|
||||||
|
customParameters,
|
||||||
} = parameters;
|
} = parameters;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -19,6 +20,7 @@ class BuildParameters {
|
|||||||
buildPath: `${buildsPath}/${targetPlatform}`,
|
buildPath: `${buildsPath}/${targetPlatform}`,
|
||||||
buildFile: this.parseBuildFile(buildName, targetPlatform),
|
buildFile: this.parseBuildFile(buildName, targetPlatform),
|
||||||
buildMethod,
|
buildMethod,
|
||||||
|
customParameters,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ class Docker {
|
|||||||
buildPath,
|
buildPath,
|
||||||
buildFile,
|
buildFile,
|
||||||
buildMethod,
|
buildMethod,
|
||||||
|
customParameters,
|
||||||
} = parameters;
|
} = parameters;
|
||||||
|
|
||||||
const command = `docker run \
|
const command = `docker run \
|
||||||
@ -43,6 +44,7 @@ class Docker {
|
|||||||
--env BUILD_PATH=${buildPath} \
|
--env BUILD_PATH=${buildPath} \
|
||||||
--env BUILD_FILE=${buildFile} \
|
--env BUILD_FILE=${buildFile} \
|
||||||
--env BUILD_METHOD=${buildMethod} \
|
--env BUILD_METHOD=${buildMethod} \
|
||||||
|
--env CUSTOM_PARAMETERS=${customParameters} \
|
||||||
--env HOME=/github/home \
|
--env HOME=/github/home \
|
||||||
--env GITHUB_REF \
|
--env GITHUB_REF \
|
||||||
--env GITHUB_SHA \
|
--env GITHUB_SHA \
|
||||||
|
@ -11,6 +11,7 @@ class Input {
|
|||||||
const buildName = core.getInput('buildName') || targetPlatform;
|
const buildName = core.getInput('buildName') || targetPlatform;
|
||||||
const buildsPath = core.getInput('buildsPath') || 'build';
|
const buildsPath = core.getInput('buildsPath') || 'build';
|
||||||
const buildMethod = core.getInput('buildMethod'); // processed in docker file
|
const buildMethod = core.getInput('buildMethod'); // processed in docker file
|
||||||
|
const customParameters = core.getInput('customParameters') || '';
|
||||||
|
|
||||||
return {
|
return {
|
||||||
unityVersion,
|
unityVersion,
|
||||||
@ -19,6 +20,7 @@ class Input {
|
|||||||
buildName,
|
buildName,
|
||||||
buildsPath,
|
buildsPath,
|
||||||
buildMethod,
|
buildMethod,
|
||||||
|
customParameters,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user