18 lines
639 B
PowerShell
18 lines
639 B
PowerShell
$buildLogPath = Join-Path $PSScriptRoot "arm_build.txt"
|
|
$errorLogPath = Join-Path $PSScriptRoot "arm_error.txt"
|
|
|
|
if (Test-Path $buildLogPath) {
|
|
$content = Get-Content $buildLogPath
|
|
$matches = $content | Select-String -Pattern "\berror\b" -CaseSensitive:$true
|
|
|
|
if ($matches) {
|
|
$matches | ForEach-Object { $_.Line } | Set-Content $errorLogPath
|
|
Write-Host "Error lines have been extracted to $errorLogPath"
|
|
Write-Host "Found $($matches.Count) matches"
|
|
} else {
|
|
Write-Host "No errors found in the build log"
|
|
}
|
|
} else {
|
|
Write-Host "Error: Build log file not found at $buildLogPath"
|
|
}
|