debug: running locally
This commit is contained in:
parent
5eee776fdb
commit
bf91024eb6
8
cli.js
8
cli.js
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const { execSync } = require('child_process')
|
const { execSync } = require('child_process')
|
||||||
|
/*
|
||||||
const event = JSON.parse(fs.readFileSync('/github/workflow/event.json').toString())
|
const event = JSON.parse(fs.readFileSync('/github/workflow/event.json').toString())
|
||||||
|
|
||||||
let messages = event.commits.map(commit => commit.message)
|
let messages = event.commits.map(commit => commit.message)
|
||||||
|
@ -10,8 +11,13 @@ if (messages.map(message => message.includes('BREAKING CHANGE')).includes(true))
|
||||||
version = 'major'
|
version = 'major'
|
||||||
} else if (messages.map(message => message.toLowerCase().startsWith('feat')).includes(true)) {
|
} else if (messages.map(message => message.toLowerCase().startsWith('feat')).includes(true)) {
|
||||||
version = 'minor'
|
version = 'minor'
|
||||||
}
|
} */
|
||||||
|
|
||||||
|
let version = 'patch'
|
||||||
|
|
||||||
|
let pkg = require('./package.json')
|
||||||
|
let current = execSync(`npm view ${pkg.name} version`).toString()
|
||||||
|
process.stdout.write(execSync(`npm version ${current}`))
|
||||||
process.stdout.write(execSync(`npm version ${version}`))
|
process.stdout.write(execSync(`npm version ${version}`))
|
||||||
process.stdout.write(execSync(`npm publish --access=public`))
|
process.stdout.write(execSync(`npm publish --access=public`))
|
||||||
process.stdout.write(execSync(`git push --tags`))
|
process.stdout.write(execSync(`git push --tags`))
|
||||||
|
|
Loading…
Reference in New Issue