Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions eng/scripts/automation/GenerateAndBuildLib.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,7 @@ function GeneratePackage()
$artifacts = @()
$apiViewArtifact = ""
$hasBreakingChange = $false
$breakingChangeItems = @()
$content = ""
$result = "succeeded"
$isGenerateSuccess = $true
Expand Down Expand Up @@ -856,8 +857,15 @@ function GeneratePackage()
$hasBreakingChange = $false
}
else {
$logFile = Get-Content -Path $logFilePath | select-object -skip 2
$breakingChanges = $logFile -join ",`n"
Write-Host "Breaking changes detected in the build log."
$logFile = Get-Content -Path $logFilePath | select-object -SkipLast 1
$regex = "error( ?):( ?)(?<breakingChange>.*) .*\["
foreach ($line in $logFile) {
if ($line -match $regex) {
$breakingChangeItems += $matches["breakingChange"]
}
}
$breakingChanges = $breakingChangeItems -join ",`n"
$content = "Breaking Changes: $breakingChanges"
$hasBreakingChange = $true
}
Expand All @@ -871,6 +879,7 @@ function GeneratePackage()
$changelog = [PSCustomObject]@{
content = $content
hasBreakingChange = $hasBreakingChange
breakingChangeItems = $breakingChangeItems
}

$ciFilePath = "sdk/$service/ci.yml"
Expand Down