Skip to content

Commit

Permalink
Unblock Sign pipeline for Az.Accounts Preview (#23778)
Browse files Browse the repository at this point in the history
  • Loading branch information
msJinLei authored Dec 19, 2023
1 parent d81c7c1 commit c38da35
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tools/PublishModules.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -590,16 +590,19 @@ function Add-AllModules {
foreach ($package in $packages) {
$fileName = $package.Name
$versionString = $fileName.Replace('Az.Accounts.', '').Replace('.nupkg', '')
$version = [version]$versionString
if(-not ($versionString -match 'preview'))
{
$version = [version]$versionString

if ($version -gt $latestVersion) {
$latestVersion = $version
$latestPackage = $package
if ($version -gt $latestVersion) {
$latestVersion = $version
$latestPackage = $package
}
}
}

foreach ($package in $packages) {
if ($package.FullName -ne $latestPackage.FullName) {
if (($package.FullName -ne $latestPackage.FullName) -and -not ($package.FullName -match 'preview')) {
Remove-Item $package.FullName -Force
}
}
Expand Down

0 comments on commit c38da35

Please sign in to comment.