Browse Source

Fix error message in CodeCheck file (#50375)

* Fix error message in CodeCheck file

* Update CodeCheck.ps1

* Update CodeCheck.ps1
William Godbe 2 years ago
parent
commit
e4b318b1f0
1 changed files with 3 additions and 2 deletions
  1. 3 2
      eng/scripts/CodeCheck.ps1

+ 3 - 2
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