yarn
yarn copied to clipboard
--no-git-tag-version option disables creation of a commit
Bug description
It says that it disables creation of a git tag but in fact it disables the whole commit. There should probably be another option to disable the whole commit (e.g. --no-git-commit) and this option should disable only creation of a tag.
Command
yarn version --no-git-tag-version --patch
What is the current behavior? It only increases the patch number in package.json.
What is the expected behavior? It should increase the patch number in package.json and create a commit (without adding a tag).
Steps to Reproduce
- run
yarn version --no-git-tag-version --patch - check git log
Environment
- Node Version:
v10.20.1 - Yarn v1 Version:
1.22.4 - OS and version: Linux Mint 19.3 Cinnamon
👍 I spent much of yesterday wondering why our CI was not pushing the updated package.json, when in fact nothing was being committed at all! I needed the --no-git-tag-version flag because the GitHub release had already made the tag, but I didn't expect all git interactions to be disabled because of that flag.
What's the command to disable this permanently in the repo? Isn't there a command to set the .yarn config in the project so it doesn't clobber the git tags? This instantly breaks most monorepos.
Any follow up on this ?
+1
+1
+1
Somewhat related: What is the proper workflow for updating version in an electron-build two package.json setup as described here https://www.electron.build/tutorials/two-package-structure. Should yarn automatically update the versions of all package.json files, or should the first one be updated by yarn without commit, then the manual update of the second one, and a final commit with the proper version message? Kinda complicated.