This commit is contained in:
2026-06-23 21:09:34 +09:30
parent 17f266863f
commit 014ca0000a
3 changed files with 46 additions and 41 deletions
-41
View File
@@ -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."
}