Skip to content

Commit ba90b6e

Browse files
committed
build: cleanup changelog in release script
1 parent 430b917 commit ba90b6e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

scripts/release.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
process.env.VUE_CLI_RELEASE = true
3131

32+
const fs = require('fs')
3233
const execa = require('execa')
3334
const semver = require('semver')
3435
const inquirer = require('inquirer')
@@ -114,6 +115,17 @@ const release = async () => {
114115
await execa(require.resolve('lerna/cli'), releaseArguments, { stdio: 'inherit' })
115116

116117
await execa('yarn', ['changelog'])
118+
119+
// cleanup changelog
120+
fs.writeFileSync(
121+
'CHANGELOG.md',
122+
fs.readFileSync('CHANGELOG.md')
123+
.toString()
124+
.split('\n')
125+
.slice(4)
126+
.join('\n')
127+
)
128+
117129
await execa('git', ['add', '-A'], { stdio: 'inherit' })
118130
await execa('git', ['commit', '-m', `chore: ${version} changelog`], { stdio: 'inherit' })
119131
}

0 commit comments

Comments
 (0)