File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,14 @@ param(
31
31
32
32
Import-Module " $PSScriptRoot /../GitHubTools.psm1" - Force
33
33
34
+ <#
35
+ . SYNOPSIS
36
+ Get the release description from the CHANGELOG
37
+ . DESCRIPTION
38
+ Gets the latest CHANGELOG entry from the CHANGELOG for use as the GitHub release description
39
+ . PARAMETER ChangelogPath
40
+ Path to the changelog file
41
+ #>
34
42
function GetDescriptionFromChangelog
35
43
{
36
44
param (
@@ -40,7 +48,10 @@ function GetDescriptionFromChangelog
40
48
)
41
49
42
50
$lines = Get-Content - Path $ChangelogPath
51
+ # First two lines are the title and newline
52
+ # Third looks like '## vX.Y.Z-releasetag'
43
53
$sb = [System.Text.StringBuilder ]::new($lines [2 ])
54
+ # Read through until the next '## vX.Y.Z-releasetag' H2
44
55
for ($i = 3 ; -not $lines [$i ].StartsWith(' ## ' ); $i ++ )
45
56
{
46
57
$null = $sb.Append (" `n " ).Append($lines [$i ])
You can’t perform that action at this time.
0 commit comments