Skip to content

Commit

Permalink
fix bug in prepare relaease for new packages that have never been rel…
Browse files Browse the repository at this point in the history
…eased (#16196)

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
  • Loading branch information
azure-sdk and chidozieononiwu committed Nov 16, 2021
1 parent 35811d2 commit a9fb5f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions eng/common/scripts/Prepare-Release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@ Write-Host "Assuming release is in $month with release date $releaseDateString"
if (Test-Path "Function:GetExistingPackageVersions")
{
$releasedVersions = GetExistingPackageVersions -PackageName $packageProperties.Name -GroupId $packageProperties.Group
$latestReleasedVersion = $releasedVersions[$releasedVersions.Count - 1]
Write-Host "Latest released version: ${latestReleasedVersion}" -ForegroundColor Green
if ($null -ne $releasedVersions -and $releasedVersions.Count -gt 0)
{
$latestReleasedVersion = $releasedVersions[$releasedVersions.Count - 1]
Write-Host "Latest released version: ${latestReleasedVersion}" -ForegroundColor Green
}
}

$currentProjectVersion = $packageProperties.Version
Expand Down

0 comments on commit a9fb5f3

Please sign in to comment.