File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -125,10 +125,12 @@ function Get-FirstChangelog {
125
125
[string ]$RepositoryName
126
126
)
127
127
$Changelog = Get-Content - Path " $PSScriptRoot /../../$RepositoryName /$ChangelogFile "
128
+ # NOTE: The space after the header marker is important! Otherwise ### matches.
129
+ $Header = $Changelog.Where ({$_.StartsWith (" ## " )}, " First" )
128
130
$Changelog.Where (
129
- { $_.StartsWith ( " ## " ) }, " SkipUntil"
131
+ { $_ -eq $Header }, " SkipUntil"
130
132
).Where (
131
- { $_.StartsWith (" ##" ) }, " Until"
133
+ { $_.StartsWith (" ## " ) -and $_ -ne $Header }, " Until"
132
134
)
133
135
}
134
136
@@ -355,5 +357,3 @@ function New-DraftRelease {
355
357
Get-GitHubRepository - OwnerName PowerShell - RepositoryName $RepositoryName |
356
358
New-GitHubRelease @ReleaseParams
357
359
}
358
-
359
- Export-ModuleMember - Function Update-Changelog , Update-Version , New-DraftRelease
You can’t perform that action at this time.
0 commit comments