Skip to content

Commit

Permalink
Update format of new Changelog Entry (#1633)
Browse files Browse the repository at this point in the history
Update changelog entry to match updated guidance https://azure.github.io/azure-sdk/policies_releases.html#change-logs

New Changelog entries will now look like
```
# Release History

## 1.15.0 (Unreleased)

### Features Added

### Breaking Changes

### Key Bugs Fixed

### Fixed


## 1.15.0-beta.1 (Unreleased)

### Features Added

- Types to represent `GeoJson` primitives.
```
  • Loading branch information
chidozieononiwu authored Jun 8, 2021
1 parent 20a7a27 commit 1028d93
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions eng/common/scripts/ChangeLog-Operations.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,32 @@ function Get-ChangeLogEntriesFromContent {
$changeLogEntries = [Ordered]@{}
try {
# walk the document, finding where the version specifiers are and creating lists
$changeLogEntry = $null
foreach ($line in $changeLogContent) {
if ($line -match $RELEASE_TITLE_REGEX) {
$changeLogEntry = [pscustomobject]@{
ReleaseVersion = $matches["version"]
ReleaseStatus = $matches["releaseStatus"]
ReleaseTitle = "## {0} {1}" -f $matches["version"], $matches["releaseStatus"]
ReleaseContent = @()
Sections = @{}
}
$changeLogEntries[$changeLogEntry.ReleaseVersion] = $changeLogEntry
}
else {
if ($changeLogEntry) {
if ($line.Trim() -match "^###\s(?<sectionName>.*)")
{
$sectionName = $matches["sectionName"].Trim()
$changeLogEntry.Sections[$sectionName] = @()
$changeLogEntry.ReleaseContent += $line
continue
}

if ($sectionName)
{
$changeLogEntry.Sections[$sectionName] += $line
}

$changeLogEntry.ReleaseContent += $line
}
}
Expand Down Expand Up @@ -195,7 +208,19 @@ function New-ChangeLogEntry {
return $null
}

if (!$Content) { $Content = @() }
if (!$Content) {
$Content = @()
$Content += ""
$Content += "### Features Added"
$Content += ""
$Content += "### Breaking Changes"
$Content += ""
$Content += "### Key Bugs Fixed"
$Content += ""
$Content += "### Fixed"
$Content += ""
$Content += ""
}

$newChangeLogEntry = [pscustomobject]@{
ReleaseVersion = $Version
Expand Down

0 comments on commit 1028d93

Please sign in to comment.