Skip to content

Commit

Permalink
Fix version-manager.ts #3911
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktMehl committed Feb 5, 2025
1 parent 68aaf90 commit 580c7f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions script/version-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ class VersionManager {
// Store changelog entries before modifying the file
unreleasedChangelogSection = this.extractChangelogSection(changelog, "unreleased")

const updatedChangelog = changelog
.replace("## [unreleased]", `## [${newVersion}] - ${date}`)
.replace(/(# Changelog\n\n)/, `$1## [unreleased] (Added 🚀 | Changed | Removed | Fixed 🐞 | Chore 👨‍💻 👩‍💻)\n\n`)
const updatedChangelog = changelog.replace(
"## [unreleased]",
`## [unreleased] (Added 🚀 | Changed | Removed | Fixed 🐞 | Chore 👨‍💻 👩‍💻)\n\n## [${newVersion}] - ${date}`
)
fs.writeFileSync(changelogPath, updatedChangelog)
} catch (error) {
throw new Error(`Failed to update changelog: ${error}`)
Expand Down

0 comments on commit 580c7f9

Please sign in to comment.