From bf91024eb643bb902bf3ea6f6496b1a2ddd77ab4 Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Sat, 26 Jan 2019 23:31:18 +0000 Subject: [PATCH] debug: running locally --- cli.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cli.js b/cli.js index 6945e32..e51e723 100644 --- a/cli.js +++ b/cli.js @@ -1,6 +1,7 @@ #!/usr/bin/env node const fs = require('fs') const { execSync } = require('child_process') + /* const event = JSON.parse(fs.readFileSync('/github/workflow/event.json').toString()) let messages = event.commits.map(commit => commit.message) @@ -10,8 +11,13 @@ if (messages.map(message => message.includes('BREAKING CHANGE')).includes(true)) version = 'major' } else if (messages.map(message => message.toLowerCase().startsWith('feat')).includes(true)) { 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 publish --access=public`)) process.stdout.write(execSync(`git push --tags`))