Skip to content

Commit 16670e4

Browse files
author
Robert Holt
committed
Fix documentation loss
1 parent 4d4530e commit 16670e4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tools/postReleaseScripts/publishGHRelease.ps1

+11
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ param(
3131

3232
Import-Module "$PSScriptRoot/../GitHubTools.psm1" -Force
3333

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+
#>
3442
function GetDescriptionFromChangelog
3543
{
3644
param(
@@ -40,7 +48,10 @@ function GetDescriptionFromChangelog
4048
)
4149

4250
$lines = Get-Content -Path $ChangelogPath
51+
# First two lines are the title and newline
52+
# Third looks like '## vX.Y.Z-releasetag'
4353
$sb = [System.Text.StringBuilder]::new($lines[2])
54+
# Read through until the next '## vX.Y.Z-releasetag' H2
4455
for ($i = 3; -not $lines[$i].StartsWith('## '); $i++)
4556
{
4657
$null = $sb.Append("`n").Append($lines[$i])

0 commit comments

Comments
 (0)