mirror of
https://github.com/primer/css.git
synced 2024-09-21 13:51:52 +03:00
add script/changelog.js
This commit is contained in:
parent
293f160aeb
commit
9c041bfe4a
18
script/changelog.js
Executable file
18
script/changelog.js
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
const semanticRelease = require('semantic-release')
|
||||||
|
const {spawnSync} = require('child_process')
|
||||||
|
const {WritableStreamBuffer} = require('stream-buffers')
|
||||||
|
|
||||||
|
const branch = spawnSync('git', ['symbolic-ref', '--short', 'HEAD'], {encoding: 'utf8'}).stdout.trim()
|
||||||
|
const options = {branch, dryRun: true}
|
||||||
|
console.warn(`Running semantic-release with options: ${JSON.stringify(options)}...`)
|
||||||
|
semanticRelease(options, {
|
||||||
|
stdout: new WritableStreamBuffer(),
|
||||||
|
stderr: new WritableStreamBuffer()
|
||||||
|
}).then(result => {
|
||||||
|
const {
|
||||||
|
nextRelease: {version, notes}
|
||||||
|
} = result
|
||||||
|
console.warn(`Release ${version} notes:\n`)
|
||||||
|
console.log(notes)
|
||||||
|
})
|
Loading…
Reference in New Issue
Block a user