fix: pushing tags

This commit is contained in:
Mikeal Rogers 2019-09-10 00:09:00 +00:00
parent 6d469bfc75
commit acfbeff435
1 changed files with 8 additions and 3 deletions

View File

@ -50,11 +50,16 @@ const run = async () => {
version = 'minor' version = 'minor'
} }
const exec = str => process.stdout.write(execSync(str))
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} `)) exec(`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()
console.log(newVersion) console.log(newVersion)
process.stdout.write(execSync(`npm publish --access=public`)) exec(`git commit -a --amend --no-edit`)
process.stdout.write(execSync(`git checkout package.json`)) exec(`npm publish --access=public`)
exec(`git push`)
await git.addTag(newVersion)
await git.pushTags('origin')
} }
run() run()