I’m trying to have yarn publish an NPM package in CodeBuild, and then push the updated package.json back to GitHub Enterprise. Everything is working except the push part. It’s not a credentials issue because the CodeBuild is able to fetch everything from the GitHub server (SSH has already been setup).
Once it has the pushed tag, it is:
user.name and user.email for git configgit branch —-contains tags/<tag> | sed -n 2p | awk ‘{printf $1}’git checkout <branch>yarn publish —-no-git-tag-version —-new-version <version from tag> which also changes and commits the package.json change.git push origin <branch>Step 1-4 seem to be working great, but step 5 just outputs “everything up-to-date” even though yarn publish changed and committed the package.json.
What else needs to be done to commit/push from CodeBuild? I’ve also tried putting git fetch —-unshallow before everything in case it needed more info, but that didn’t change anything. It’s as if checking out a branch in CodeBuild doesn’t track the remote branch?
After step 4, it seems you haven't committed anything to your current branch.
Check git status for untracked and modified files, you can add these using git add <files> or add all using git add ..
Once this is done, you can use git status again to check that the files have been added correctly, and commit the files with git commit and you should be able to push successfully.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With