mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
Update exit code name, set default exit code to -1 to make bugs obvious
This commit is contained in:
parent
f7d4ece67f
commit
9413908134
@ -261,6 +261,11 @@ outputs:
|
||||
description: 'The generated version used for the Unity build'
|
||||
androidVersionCode:
|
||||
description: 'The generated versionCode used for the Android Unity build'
|
||||
engineExitCode:
|
||||
description:
|
||||
'Returns the exit code from the build scripts. This code is 0 if the build was successful. If there was an error
|
||||
during activation, the code is from the activation step. If activation is successful, the code is from the project
|
||||
build step.'
|
||||
branding:
|
||||
icon: 'box'
|
||||
color: 'gray-dark'
|
||||
|
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
@ -19,7 +19,7 @@ async function runMain() {
|
||||
const buildParameters = await BuildParameters.create();
|
||||
const baseImage = new ImageTag(buildParameters);
|
||||
|
||||
let exitCode = 0;
|
||||
let exitCode = -1;
|
||||
|
||||
if (buildParameters.providerStrategy === 'local') {
|
||||
core.info('Building locally');
|
||||
@ -39,7 +39,7 @@ async function runMain() {
|
||||
// Set output
|
||||
await Output.setBuildVersion(buildParameters.buildVersion);
|
||||
await Output.setAndroidVersionCode(buildParameters.androidVersionCode);
|
||||
await Output.setExitCode(exitCode);
|
||||
await Output.setEngineExitCode(exitCode);
|
||||
|
||||
if (exitCode !== 0) {
|
||||
core.setFailed(`Build failed with exit code ${exitCode}`);
|
||||
|
@ -9,8 +9,8 @@ class Output {
|
||||
core.setOutput('androidVersionCode', androidVersionCode);
|
||||
}
|
||||
|
||||
static async setExitCode(exitCode: number) {
|
||||
core.setOutput('exitCode', exitCode);
|
||||
static async setEngineExitCode(exitCode: number) {
|
||||
core.setOutput('engineExitCode', exitCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user