vue/scripts/gen-release-note.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
434 B
JavaScript
Raw Normal View History

2017-07-13 05:41:11 +00:00
const version = process.argv[2] || process.env.VERSION
const cc = require('conventional-changelog')
const file = `./RELEASE_NOTE${version ? `_${version}` : ``}.md`
const fileStream = require('fs').createWriteStream(file)
cc({
preset: 'angular',
pkg: {
transform (pkg) {
pkg.version = `v${version}`
return pkg
}
}
}).pipe(fileStream).on('close', () => {
console.log(`Generated release note at ${file}`)
})