Skip to content

Commit 347b009

Browse files
committed
Remove API baseline check
1 parent e033f15 commit 347b009

File tree

2 files changed

+1079
-1116
lines changed

2 files changed

+1079
-1116
lines changed

eng/scripts/CodeCheck.ps1

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -190,43 +190,6 @@ try {
190190
& git --no-pager diff --ignore-space-change $filePath
191191
}
192192
}
193-
194-
$targetBranch = $env:SYSTEM_PULLREQUEST_TARGETBRANCH
195-
196-
if (![string]::IsNullOrEmpty($targetBranch)) {
197-
if ($targetBranch.StartsWith('refs/heads/')) {
198-
$targetBranch = $targetBranch.Replace('refs/heads/','')
199-
}
200-
201-
# Retrieve the set of changed files compared to main
202-
Write-Host "Checking for changes to API baseline files $targetBranch"
203-
204-
$changedFilesFromTarget = git --no-pager diff origin/$targetBranch --ignore-space-change --name-only --diff-filter=ar
205-
$changedAPIBaselines = [System.Collections.Generic.List[string]]::new()
206-
207-
if ($changedFilesFromTarget) {
208-
foreach ($file in $changedFilesFromTarget) {
209-
# Check for changes in Shipped in all branches
210-
if ($file -like '*PublicAPI.Shipped.txt') {
211-
$changedAPIBaselines.Add($file)
212-
}
213-
# Check for changes in Unshipped in servicing branches
214-
if ($targetBranch -like 'release*' -and $file -like '*PublicAPI.Unshipped.txt') {
215-
$changedAPIBaselines.Add($file)
216-
}
217-
}
218-
}
219-
220-
Write-Host "Found changes in $($changedAPIBaselines.count) API baseline files"
221-
222-
if ($changedAPIBaselines.count -gt 0) {
223-
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."
224-
LogError "Modified API baseline files:"
225-
foreach ($file in $changedAPIBaselines) {
226-
LogError $file
227-
}
228-
}
229-
}
230193
}
231194
finally {
232195
Write-Host ""

0 commit comments

Comments
 (0)