From 44154ca6a0c4a24cd3de53e27fd183a3e00bc629 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Mon, 28 Aug 2023 09:24:49 -0700 Subject: [PATCH 1/3] Fix error message in CodeCheck file --- eng/scripts/CodeCheck.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eng/scripts/CodeCheck.ps1 b/eng/scripts/CodeCheck.ps1 index 1b6f3c5d55ed..18bc7c6e2fc7 100644 --- a/eng/scripts/CodeCheck.ps1 +++ b/eng/scripts/CodeCheck.ps1 @@ -263,7 +263,9 @@ 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. If this is an rc branch and you've updated a PublicAPI.Unshipped.txt " + + "file, contact a repo admin to help you force-merge this PR. See /docs/APIBaselines.md for more information.") LogError "Modified API baseline files:" foreach ($file in $changedAPIBaselines) { LogError $file From 9240d8989ee10bc0902924019f0fd3a882a985bd Mon Sep 17 00:00:00 2001 From: William Godbe Date: Mon, 28 Aug 2023 13:48:27 -0700 Subject: [PATCH 2/3] Update CodeCheck.ps1 --- eng/scripts/CodeCheck.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/scripts/CodeCheck.ps1 b/eng/scripts/CodeCheck.ps1 index 18bc7c6e2fc7..5c2616ad5cbe 100644 --- a/eng/scripts/CodeCheck.ps1 +++ b/eng/scripts/CodeCheck.ps1 @@ -264,7 +264,7 @@ 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, and PublicAPI.Unshipped.txt files should not " + - "be updated in release branches. If this is an rc branch and you've updated a PublicAPI.Unshipped.txt " + + "be updated in release branches. If this is a preview or rc branch and you've updated a PublicAPI.Unshipped.txt " + "file, contact a repo admin to help you force-merge this PR. See /docs/APIBaselines.md for more information.") LogError "Modified API baseline files:" foreach ($file in $changedAPIBaselines) { From 8f1a054fd4eb8b9bcf7e225accab65688555400c Mon Sep 17 00:00:00 2001 From: William Godbe Date: Mon, 28 Aug 2023 13:58:09 -0700 Subject: [PATCH 3/3] Update CodeCheck.ps1 --- eng/scripts/CodeCheck.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eng/scripts/CodeCheck.ps1 b/eng/scripts/CodeCheck.ps1 index 5c2616ad5cbe..616e3dcc6693 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) } } @@ -264,8 +264,7 @@ 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, and PublicAPI.Unshipped.txt files should not " + - "be updated in release branches. If this is a preview or rc branch and you've updated a PublicAPI.Unshipped.txt " + - "file, contact a repo admin to help you force-merge this PR. See /docs/APIBaselines.md for more information.") + "be updated in release branches. See /docs/APIBaselines.md for more information.") LogError "Modified API baseline files:" foreach ($file in $changedAPIBaselines) { LogError $file