Skip to content

Commit

Permalink
Fix API compatibility script (#936)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucGenetier authored Dec 23, 2022
1 parent a45e82a commit bd458dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .scripts/ApiCompat.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $apiTool="tool\.store\microsoft.dotnet.apicompat.tool\7.0.100\microsoft.dotnet.a
$apiToolRightFolder="Output"

[xml]$xfiles = Get-Content .\ApiCompat.Files.xml
$e = [char]0x274C
$e = "<br />" + [char]0x274C

foreach ($a in $xfiles.ApiCompat.Assembly)
{
Expand All @@ -25,11 +25,11 @@ foreach ($a in $xfiles.ApiCompat.Assembly)
dotnet $apiTool --suppression-file $s --left-assembly $apiToolLeft --right-assembly $apiToolRight --enable-rule-attributes-must-match --enable-rule-cannot-change-parameter-name --generate-suppression-file

[xml]$x = Get-Content $s
$e += [string]::Join([char]0x274C, ($x.Suppressions.Suppression | % { $_.DiagnosticId + " " + $_.Target })).Trim()
$e += [string]::Join("<br />" + [char]0x274C, ($x.Suppressions.Suppression | % { $_.DiagnosticId + " " + $_.Target })).Trim()
}


if ($e.Length -gt 2)
if ($e.Length -gt 8)
{
Write-Host "##[error] $e"
Write-Host "##vso[task.setvariable variable=ApiCompat;issecret=false]Public API changes: $e"
Expand Down

0 comments on commit bd458dc

Please sign in to comment.