Skip to content

Commit 82c715a

Browse files
authored
No longer overwrite preview changelog (Azure#21794)
1 parent c35b242 commit 82c715a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

eng/tools/generator/cmd/v2/common/fileProcessor.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,12 +362,7 @@ func AddChangelogToFile(changelog *model.Changelog, version *semver.Version, pac
362362

363363
oldChangelog := string(b)
364364
newChangelog := "# Release History\n\n"
365-
var matchResults [][]int
366-
if version.Prerelease() == "" {
367-
matchResults = changelogPosWithoutPreviewRegex.FindAllStringSubmatchIndex(oldChangelog, -1)
368-
} else {
369-
matchResults = changelogPosWithPreviewRegex.FindAllStringSubmatchIndex(oldChangelog, -1)
370-
}
365+
matchResults := changelogPosWithPreviewRegex.FindAllStringSubmatchIndex(oldChangelog, -1)
371366
additionalChangelog := changelog.ToCompactMarkdown()
372367
if releaseDate == "" {
373368
releaseDate = time.Now().Format("2006-01-02")

0 commit comments

Comments
 (0)