Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yarn updating package version with git tag message

I know that npm can set the git tag message when updating a package version like this

npm version patch -m "Upgrade to %s for reasons"

how can we do that in yarn?

like image 316
mukhlis Avatar asked Sep 05 '25 02:09

mukhlis


1 Answers

According to the documentation, you can do it by setting setting your yarn configuration.

yarn config set version-git-message "Upgrade to %s for reasons"

There does not appear to be a documented command-line option. One workaround might be to run the command above before running yarn version and then running a yarn config command to unset version-git-message. It may also be possible to use git hooks to achieve what you need.

like image 102
Trott Avatar answered Sep 11 '25 05:09

Trott