Skip to content

Commit

Permalink
Add latest released version to prepare prerelease (#15941)
Browse files Browse the repository at this point in the history
Co-authored-by: Chidozie Ononiwu <[email protected]>
  • Loading branch information
azure-sdk and chidozieononiwu authored Oct 26, 2021
1 parent aa9a61a commit 95133e6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions eng/common/scripts/Prepare-Release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 95133e6

Please sign in to comment.