Skip to content

Commit

Permalink
ci: improve generated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jun 13, 2024
1 parent cae13aa commit d202669
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/update-changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 13,9 @@ async function main () {
const commits = await getLatestCommits().then(commits => commits.filter(
c => config.types[c.type] && !(c.type === 'chore' && c.scope === 'deps' && !c.isBreaking),
))
const bumpType = await determineBumpType()
const bumpType = await determineBumpType() || 'patch'

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

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

0 comments on commit d202669

Please sign in to comment.