Skip to content

Commit e4b318b

Browse files
authored
Fix error message in CodeCheck file (#50375)
* Fix error message in CodeCheck file * Update CodeCheck.ps1 * Update CodeCheck.ps1
1 parent bde033e commit e4b318b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

eng/scripts/CodeCheck.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ try {
253253
}
254254
}
255255
# Check for changes in Unshipped in servicing branches
256-
if ($targetBranch -like 'release*' -and $targetBranch -notlike '*preview*' -and $file -like '*PublicAPI.Unshipped.txt') {
256+
if ($targetBranch -like 'release*' -and $targetBranch -notlike '*preview*' -and $targetBranch -notlike '*rc1*' -and $targetBranch -notlike '*rc2*' -and $file -like '*PublicAPI.Unshipped.txt') {
257257
$changedAPIBaselines.Add($file)
258258
}
259259
}
@@ -263,7 +263,8 @@ try {
263263

264264
if ($changedAPIBaselines.count -gt 0) {
265265
LogError ("Detected modification to baseline API files. PublicAPI.Shipped.txt files should only " +
266-
"be updated after a major release. See /docs/APIBaselines.md for more information.")
266+
"be updated after a major release, and PublicAPI.Unshipped.txt files should not " +
267+
"be updated in release branches. See /docs/APIBaselines.md for more information.")
267268
LogError "Modified API baseline files:"
268269
foreach ($file in $changedAPIBaselines) {
269270
LogError $file

0 commit comments

Comments
 (0)