more
This commit is contained in:
@@ -138,44 +138,6 @@ try {
|
||||
|
||||
$process.WaitForExit()
|
||||
|
||||
# -----------------------------
|
||||
# Wait for log file creation
|
||||
# -----------------------------
|
||||
$timeoutSeconds = 60
|
||||
$elapsed = 0
|
||||
|
||||
while (!(Test-Path $logFile) -and $elapsed -lt $timeoutSeconds) {
|
||||
Start-Sleep -Seconds 1
|
||||
$elapsed++
|
||||
}
|
||||
|
||||
if (!(Test-Path $logFile)) {
|
||||
throw "Unity log file was not created at: $logFile"
|
||||
}
|
||||
|
||||
# -----------------------------
|
||||
# Wait for file writes to finish
|
||||
# -----------------------------
|
||||
$previousLength = -1
|
||||
|
||||
do {
|
||||
$currentLength = (Get-Item $logFile).Length
|
||||
|
||||
if ($currentLength -eq $previousLength) {
|
||||
break
|
||||
}
|
||||
|
||||
$previousLength = $currentLength
|
||||
|
||||
Start-Sleep -Milliseconds 500
|
||||
|
||||
} while ($true)
|
||||
|
||||
# -----------------------------
|
||||
# Archive log
|
||||
# -----------------------------
|
||||
Copy-Item $logFile $artifactLog -Force
|
||||
|
||||
# -----------------------------
|
||||
# Build failed
|
||||
# -----------------------------
|
||||
@@ -221,7 +183,4 @@ try {
|
||||
catch {
|
||||
Write-Error $_.Exception.Message
|
||||
exit 1
|
||||
}
|
||||
finally {
|
||||
Write-Host "Cleanup complete."
|
||||
}
|
||||
Reference in New Issue
Block a user