From e4b318b1f0d455f4a3ee8ce71189afa0f911b518 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Tue, 29 Aug 2023 08:41:43 -0700 Subject: [PATCH] Fix error message in CodeCheck file (#50375) * Fix error message in CodeCheck file * Update CodeCheck.ps1 * Update CodeCheck.ps1 --- eng/scripts/CodeCheck.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/scripts/CodeCheck.ps1 b/eng/scripts/CodeCheck.ps1 index 1b6f3c5d55e..616e3dcc669 100644 --- a/eng/scripts/CodeCheck.ps1 +++ b/eng/scripts/CodeCheck.ps1 @@ -253,7 +253,7 @@ try { } } # Check for changes in Unshipped in servicing branches - if ($targetBranch -like 'release*' -and $targetBranch -notlike '*preview*' -and $file -like '*PublicAPI.Unshipped.txt') { + if ($targetBranch -like 'release*' -and $targetBranch -notlike '*preview*' -and $targetBranch -notlike '*rc1*' -and $targetBranch -notlike '*rc2*' -and $file -like '*PublicAPI.Unshipped.txt') { $changedAPIBaselines.Add($file) } } @@ -263,7 +263,8 @@ try { if ($changedAPIBaselines.count -gt 0) { LogError ("Detected modification to baseline API files. PublicAPI.Shipped.txt files should only " + - "be updated after a major release. See /docs/APIBaselines.md for more information.") + "be updated after a major release, and PublicAPI.Unshipped.txt files should not " + + "be updated in release branches. See /docs/APIBaselines.md for more information.") LogError "Modified API baseline files:" foreach ($file in $changedAPIBaselines) { LogError $file