Update Prepare-Release.ps1 to handle only one previous release (#1725)
In the case there is exactly one previous release PS will return the single object and thus the Count property will not exist. Instead this change ensures that we always have a list. Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
This commit is contained in:
Родитель
57eea2d51f
Коммит
17914dc68b
|
@ -116,7 +116,7 @@ $month = $ParsedReleaseDate.ToString("MMMM")
|
|||
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
|
||||
$releasedVersions = @(GetExistingPackageVersions -PackageName $packageProperties.Name -GroupId $packageProperties.Group)
|
||||
if ($null -ne $releasedVersions -and $releasedVersions.Count -gt 0)
|
||||
{
|
||||
$latestReleasedVersion = $releasedVersions[$releasedVersions.Count - 1]
|
||||
|
|
Загрузка…
Ссылка в новой задаче