From acfbeff435c825e1d582f2c361ba6e13de8e7628 Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Tue, 10 Sep 2019 00:09:00 +0000 Subject: [PATCH] fix: pushing tags --- merge-release-run.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/merge-release-run.js b/merge-release-run.js index 3232b63..ad13759 100644 --- a/merge-release-run.js +++ b/merge-release-run.js @@ -50,11 +50,16 @@ const run = async () => { version = 'minor' } + const exec = str => process.stdout.write(execSync(str)) + 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() console.log(newVersion) - process.stdout.write(execSync(`npm publish --access=public`)) - process.stdout.write(execSync(`git checkout package.json`)) + exec(`git commit -a --amend --no-edit`) + exec(`npm publish --access=public`) + exec(`git push`) + await git.addTag(newVersion) + await git.pushTags('origin') } run()