Skip to content

Commit d202669

Browse files
committed
ci: improve generated changelog
1 parent cae13aa commit d202669

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/update-changelog.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ async function main () {
1313
const commits = await getLatestCommits().then(commits => commits.filter(
1414
c => config.types[c.type] && !(c.type === 'chore' && c.scope === 'deps' && !c.isBreaking),
1515
))
16-
const bumpType = await determineBumpType()
16+
const bumpType = await determineBumpType() || 'patch'
1717

18-
const newVersion = inc(workspace.find('nuxt').data.version, bumpType || 'patch')
18+
const newVersion = inc(workspace.find('nuxt').data.version, bumpType)
1919
const changelog = await generateMarkDown(commits, config)
2020

2121
// Create and push a branch with bumped versions if it has not already been created
@@ -44,7 +44,8 @@ async function main () {
4444
changelog
4545
.replace(/^## v.*\n/, '')
4646
.replace(`...${releaseBranch}`, `...v${newVersion}`)
47-
.replace(/### Contributors[\s\S]*$/, ''),
47+
.replace(/### Contributors[\s\S]*$/, '')
48+
.replace(/[\n\r]+/g, '\n'),
4849
'### ❤️ Contributors',
4950
contributors.map(c => `- ${c.name} (@${c.username})`).join('\n'),
5051
].join('\n')

0 commit comments

Comments
 (0)