Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JakubRimal opened this issue May 21, 2020 · 7 comments
Open

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

JakubRimal opened this issue May 21, 2020 · 7 comments

Comments

@JakubRimal
Copy link

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
@dparker2
Copy link

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

@tony
Copy link

tony commented Mar 31, 2021

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.

MethodenMann pushed a commit to tocco/tocco-client that referenced this issue May 28, 2021
dueto a bug (yarnpkg/yarn#8141), the tag should not be disabled.
Otherwise no commit will be crated.
@lvndry
Copy link

lvndry commented Aug 9, 2021

Any follow up on this ?

@zeabdelkhalek
Copy link

+1

2 similar comments
@sarkstephan
Copy link

+1

@ilfa
Copy link

ilfa commented Apr 20, 2022

+1

@Marvbudd
Copy link

Marvbudd commented Jun 9, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants