mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
Switch to dot sourcing for windows, pass exit code out and disable error parsing
This commit is contained in:
parent
caa0a81b47
commit
e315ddedca
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.
8
dist/platforms/windows/build.ps1
vendored
8
dist/platforms/windows/build.ps1
vendored
@ -169,13 +169,15 @@ while (!$process.HasExited) {
|
||||
Start-Sleep -Seconds 10
|
||||
Get-Process
|
||||
|
||||
$BUILD_EXIT_CODE = $process.ExitCode
|
||||
|
||||
# Display results
|
||||
if ($process.ExitCode -eq 0)
|
||||
if ($BUILD_EXIT_CODE -eq 0)
|
||||
{
|
||||
Write-Output "Build Succeeded!!"
|
||||
} else
|
||||
{
|
||||
Write-Output "$('Build failed, with exit code ')$($process.ExitCode)$('"')"
|
||||
Write-Output "$('Build failed, with exit code ')$($BUILD_EXIT_CODE)$('"')"
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
@ -187,7 +189,7 @@ while (!$process.HasExited) {
|
||||
Get-ChildItem $Env:BUILD_PATH_FULL
|
||||
Write-Output ""
|
||||
|
||||
exit $process.ExitCode
|
||||
break
|
||||
}
|
||||
|
||||
Start-Sleep -Seconds 5
|
||||
|
10
dist/platforms/windows/entrypoint.ps1
vendored
10
dist/platforms/windows/entrypoint.ps1
vendored
@ -12,16 +12,18 @@ regsvr32 C:\ProgramData\Microsoft\VisualStudio\Setup\x64\Microsoft.VisualStudio.
|
||||
Get-Process -Name regsvr32 | ForEach-Object { Stop-Process -Id $_.Id -Force }
|
||||
|
||||
# Setup Git Credentials
|
||||
& "c:\steps\set_gitcredential.ps1"
|
||||
. "c:\steps\set_gitcredential.ps1"
|
||||
|
||||
# Activate Unity
|
||||
& "c:\steps\activate.ps1"
|
||||
. "c:\steps\activate.ps1"
|
||||
|
||||
# Build the project
|
||||
& "c:\steps\build.ps1"
|
||||
. "c:\steps\build.ps1"
|
||||
|
||||
# Free the seat for the activated license
|
||||
& "c:\steps\return_license.ps1"
|
||||
. "c:\steps\return_license.ps1"
|
||||
|
||||
Start-Sleep -Seconds 3
|
||||
Get-Process
|
||||
|
||||
exit $BUILD_EXIT_CODE
|
||||
|
@ -15,7 +15,7 @@ class Docker {
|
||||
// eslint-disable-next-line unicorn/no-useless-undefined
|
||||
options: ExecOptions | undefined = undefined,
|
||||
entrypointBash: boolean = false,
|
||||
errorWhenMissingUnityBuildResults: boolean = true,
|
||||
errorWhenMissingUnityBuildResults: boolean = false,
|
||||
) {
|
||||
let runCommand = '';
|
||||
switch (process.platform) {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { getExecOutput, ExecOptions } from '@actions/exec';
|
||||
import { ExecOptions, getExecOutput } from '@actions/exec';
|
||||
|
||||
export async function execWithErrorCheck(
|
||||
commandLine: string,
|
||||
arguments_?: string[],
|
||||
options?: ExecOptions,
|
||||
errorWhenMissingUnityBuildResults: boolean = true,
|
||||
errorWhenMissingUnityBuildResults: boolean = false,
|
||||
): Promise<number> {
|
||||
const result = await getExecOutput(commandLine, arguments_, options);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user