mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +00:00
ci: improve generated changelog
This commit is contained in:
parent
cae13aaa24
commit
d202669611
@ -13,9 +13,9 @@ async function main () {
|
|||||||
const commits = await getLatestCommits().then(commits => commits.filter(
|
const commits = await getLatestCommits().then(commits => commits.filter(
|
||||||
c => config.types[c.type] && !(c.type === 'chore' && c.scope === 'deps' && !c.isBreaking),
|
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)
|
const changelog = await generateMarkDown(commits, config)
|
||||||
|
|
||||||
// Create and push a branch with bumped versions if it has not already been created
|
// Create and push a branch with bumped versions if it has not already been created
|
||||||
@ -44,7 +44,8 @@ async function main () {
|
|||||||
changelog
|
changelog
|
||||||
.replace(/^## v.*\n/, '')
|
.replace(/^## v.*\n/, '')
|
||||||
.replace(`...${releaseBranch}`, `...v${newVersion}`)
|
.replace(`...${releaseBranch}`, `...v${newVersion}`)
|
||||||
.replace(/### ❤️ Contributors[\s\S]*$/, ''),
|
.replace(/### ❤️ Contributors[\s\S]*$/, '')
|
||||||
|
.replace(/[\n\r]+/g, '\n'),
|
||||||
'### ❤️ Contributors',
|
'### ❤️ Contributors',
|
||||||
contributors.map(c => `- ${c.name} (@${c.username})`).join('\n'),
|
contributors.map(c => `- ${c.name} (@${c.username})`).join('\n'),
|
||||||
].join('\n')
|
].join('\n')
|
||||||
|
Loading…
Reference in New Issue
Block a user