yarn icon indicating copy to clipboard operation
yarn copied to clipboard

--no-git-tag-version option disables creation of a commit

Open JakubRimal opened this issue 5 years ago • 7 comments

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

  1. run yarn version --no-git-tag-version --patch
  2. check git log

Environment

  • Node Version: v10.20.1
  • Yarn v1 Version: 1.22.4
  • OS and version: Linux Mint 19.3 Cinnamon

JakubRimal avatar May 21 '20 14:05 JakubRimal

👍 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.

dparker2 avatar May 22 '20 23:05 dparker2

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.

tony avatar Mar 31 '21 21:03 tony

Any follow up on this ?

lvndry avatar Aug 09 '21 12:08 lvndry

+1

zeabdelkhalek avatar Mar 11 '22 14:03 zeabdelkhalek

+1

sarkstephan avatar Apr 06 '22 18:04 sarkstephan

+1

ilfa avatar Apr 20 '22 19:04 ilfa

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.

Marvbudd avatar Jun 09 '22 00:06 Marvbudd