fix: absolute import path

This commit is contained in:
Mikeal Rogers 2019-02-02 09:07:12 -08:00 committed by GitHub
parent 11f2f5af1a
commit f0002b6c97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
console.log(process.argv) console.log(process.argv)
const fs = require('fs') const fs = require('fs')
const path = require('path')
const { execSync } = require('child_process') const { execSync } = require('child_process')
/* Configure git */ /* Configure git */
@ -20,7 +21,7 @@ if (messages.map(message => message.includes('BREAKING CHANGE')).includes(true))
version = 'minor' version = 'minor'
} }
let pkg = require('./package.json') let pkg = require(path.join(process.cwd(), 'package.json'))
let current = execSync(`npm view ${pkg.name} version`).toString() let current = execSync(`npm view ${pkg.name} version`).toString()
process.stdout.write(execSync(`npm version --allow-same-version=true --git-tag-version=false ${current} `)) process.stdout.write(execSync(`npm version --allow-same-version=true --git-tag-version=false ${current} `))
let newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString() let newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString()