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.
This commit is contained in:
Fadee kannah 2019-09-07 22:15:43 -07:00
parent 5213521185
commit 2a12a1679c
1 changed files with 2 additions and 1 deletions

View File

@ -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')
}