Avoid unnecessary CHANGELOG release date prompt (#5161)

Resolves #7261

Co-authored-by: Heath Stewart <heaths@microsoft.com>
This commit is contained in:
Azure SDK Bot 2023-11-13 11:44:35 -08:00 committed by GitHub
parent 2aafab4605
commit cc4f390a85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -182,7 +182,7 @@ if (Test-Path "Function:SetPackageVersion")
{
$replaceLatestEntryTitle = $true
$latestVersion = Get-LatestReleaseDateFromChangeLog -ChangeLogLocation $packageProperties.ChangeLogPath
if ($latestVersion)
if ($latestVersion -and $latestVersion -ne $ParsedReleaseDate)
{
$promptMessage = "The latest entry in the CHANGELOG.md already has a release date. Do you want to replace the latest entry title? Please enter (y or n)."
while (($readInput = Read-Host -Prompt $promptMessage) -notmatch '^[yn]$'){ }