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
|
Start-Sleep -Seconds 10
|
||||||
Get-Process
|
Get-Process
|
||||||
|
|
||||||
|
$BUILD_EXIT_CODE = $process.ExitCode
|
||||||
|
|
||||||
# Display results
|
# Display results
|
||||||
if ($process.ExitCode -eq 0)
|
if ($BUILD_EXIT_CODE -eq 0)
|
||||||
{
|
{
|
||||||
Write-Output "Build Succeeded!!"
|
Write-Output "Build Succeeded!!"
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
Write-Output "$('Build failed, with exit code ')$($process.ExitCode)$('"')"
|
Write-Output "$('Build failed, with exit code ')$($BUILD_EXIT_CODE)$('"')"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
@ -187,7 +189,7 @@ while (!$process.HasExited) {
|
|||||||
Get-ChildItem $Env:BUILD_PATH_FULL
|
Get-ChildItem $Env:BUILD_PATH_FULL
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
|
|
||||||
exit $process.ExitCode
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
Start-Sleep -Seconds 5
|
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 }
|
Get-Process -Name regsvr32 | ForEach-Object { Stop-Process -Id $_.Id -Force }
|
||||||
|
|
||||||
# Setup Git Credentials
|
# Setup Git Credentials
|
||||||
& "c:\steps\set_gitcredential.ps1"
|
. "c:\steps\set_gitcredential.ps1"
|
||||||
|
|
||||||
# Activate Unity
|
# Activate Unity
|
||||||
& "c:\steps\activate.ps1"
|
. "c:\steps\activate.ps1"
|
||||||
|
|
||||||
# Build the project
|
# Build the project
|
||||||
& "c:\steps\build.ps1"
|
. "c:\steps\build.ps1"
|
||||||
|
|
||||||
# Free the seat for the activated license
|
# Free the seat for the activated license
|
||||||
& "c:\steps\return_license.ps1"
|
. "c:\steps\return_license.ps1"
|
||||||
|
|
||||||
Start-Sleep -Seconds 3
|
Start-Sleep -Seconds 3
|
||||||
Get-Process
|
Get-Process
|
||||||
|
|
||||||
|
exit $BUILD_EXIT_CODE
|
||||||
|
@ -15,7 +15,7 @@ class Docker {
|
|||||||
// eslint-disable-next-line unicorn/no-useless-undefined
|
// eslint-disable-next-line unicorn/no-useless-undefined
|
||||||
options: ExecOptions | undefined = undefined,
|
options: ExecOptions | undefined = undefined,
|
||||||
entrypointBash: boolean = false,
|
entrypointBash: boolean = false,
|
||||||
errorWhenMissingUnityBuildResults: boolean = true,
|
errorWhenMissingUnityBuildResults: boolean = false,
|
||||||
) {
|
) {
|
||||||
let runCommand = '';
|
let runCommand = '';
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { getExecOutput, ExecOptions } from '@actions/exec';
|
import { ExecOptions, getExecOutput } from '@actions/exec';
|
||||||
|
|
||||||
export async function execWithErrorCheck(
|
export async function execWithErrorCheck(
|
||||||
commandLine: string,
|
commandLine: string,
|
||||||
arguments_?: string[],
|
arguments_?: string[],
|
||||||
options?: ExecOptions,
|
options?: ExecOptions,
|
||||||
errorWhenMissingUnityBuildResults: boolean = true,
|
errorWhenMissingUnityBuildResults: boolean = false,
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
const result = await getExecOutput(commandLine, arguments_, options);
|
const result = await getExecOutput(commandLine, arguments_, options);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user