From 2a12a1679c2dc893e76223d511b22bab6ad2f73d Mon Sep 17 00:00:00 2001 From: Fadee kannah Date: Sat, 7 Sep 2019 22:15:43 -0700 Subject: [PATCH] feat: Update git commit to include the updated package json version amend the updated package.json to the latest commit and use that for publishing then push the same commit to the repo. When the workflow gets triggered the hashes will be the same. --- merge-release-run.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/merge-release-run.js b/merge-release-run.js index 257d2ca..6faecbc 100644 --- a/merge-release-run.js +++ b/merge-release-run.js @@ -50,8 +50,9 @@ const run = async () => { 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() console.log(newVersion) + process.stdout.write(execSync(`git commit -a --amend --no-edit`)) process.stdout.write(execSync(`npm publish --access=public`)) - process.stdout.write(execSync(`git checkout package.json`)) + process.stdout.write(execSync(`git push`)) await git.addTag(newVersion) await git.pushTags('origin') }