diff --git a/eng/common/scripts/Prepare-Release.ps1 b/eng/common/scripts/Prepare-Release.ps1 index 2005347822f..5a8940266bf 100644 --- a/eng/common/scripts/Prepare-Release.ps1 +++ b/eng/common/scripts/Prepare-Release.ps1 @@ -109,11 +109,15 @@ else $releaseDateString = $ParsedReleaseDate.ToString("MM/dd/yyyy") $month = $ParsedReleaseDate.ToString("MMMM") -Write-Host Write-Host "Assuming release is in $month with release date $releaseDateString" -ForegroundColor Green +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 +} $currentProjectVersion = $packageProperties.Version - $newVersion = Read-Host -Prompt "Input the new version, or press Enter to use use current project version '$currentProjectVersion'" if (!$newVersion)