Skip to content

Commit 7c0cf63

Browse files
authored
fix: ignore deprecated package when dep check (Azure#18184)
1 parent ee4c945 commit 7c0cf63

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

eng/scripts/Invoke-DependencyCheck.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ if ($LASTEXITCODE) { exit $LASTEXITCODE }
2424
function IsPackageDeprecated($sdk)
2525
{
2626
$RETRACT_SECTION_REGEX = "retract\s*((?<retract>(.|\s)*))"
27+
$DEPRECATE_SECTION_REGEX = "\/\/\s*Deprecated:"
2728
$modContent = Get-Content (Join-Path $sdk.DirectoryPath 'go.mod') -Raw
29+
if ($modContent -match $DEPRECATE_SECTION_REGEX) {
30+
return $true
31+
}
2832
if ($modContent -match $RETRACT_SECTION_REGEX) {
2933
return $($matches["retract"]).Indexof($sdk.Version) -ne -1
3034
}

0 commit comments

Comments
 (0)