Skip to content

Commit

Permalink
Merge pull request #6143 from microsoft/ci/fix-release-notes
Browse files Browse the repository at this point in the history
ci: fixes release notes script trimming the last character
  • Loading branch information
baywet authored Feb 13, 2025
2 parents a94ece7 + 5344c0a commit 8e71ba3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/get-release-notes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if ($version -ne "Unreleased" -and $versionLineNumber -lt 0) {
throw "Version $version not found in CHANGELOG.md make sure you've updated the changelog"
}
$headerLineNumber = $changeLogContent.IndexOf("`n" , $versionLineNumber) + 3
$endLineNumber = $changeLogContent.IndexOf("## [", $headerLineNumber) - 3
$endLineNumber = $changeLogContent.IndexOf("## [", $headerLineNumber) - 2
$releaseNotes = $changeLogContent.Substring($headerLineNumber, $endLineNumber - $headerLineNumber)
if ($version -eq "Unreleased" -and [string]::IsNullOrWhiteSpace($releaseNotes.Replace("### Changed", "").Replace("### Added", ""))) {
throw "Version $version not found in CHANGELOG.md make sure you've updated the changelog"
Expand Down

0 comments on commit 8e71ba3

Please sign in to comment.