-
-
Save heaths/587f0ed4f928fb5bd539c4680a793013 to your computer and use it in GitHub Desktop.
Gets a list of deprecated Azure SDK for .NET packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
param( | |
[ValidateNotNullOrEmpty()] | |
[Parameter()] | |
[datetime] $Date = [DateTime]::Now | |
) | |
$packages = Invoke-WebRequest 'https://raw.githubusercontent.com/Azure/azure-sdk/main/_data/releases/latest/dotnet-packages.csv' | ConvertFrom-Csv | |
$deprecated = $packages | Where-Object { $_.Support -eq 'deprecated' -and [datetime] $_.EOLDate -le $Date } | |
Write-Verbose "Found $($deprecated.Length) deprecated packages" | |
$services = @{} | |
$discovered = 0 | |
foreach ($sd in Get-ChildItem 'sdk') { | |
foreach ($p in Get-ChildItem $sd | Where-Object Name -in $deprecated.Package) { | |
$discovered++ | |
$services[$sd.Name] += @($p.Name) | |
} | |
} | |
Write-Verbose "Found $discovered deprecated packages in $($services.Count) service directories" | |
$services.GetEnumerator() # Unroll the hashtable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment