mukhlis
mukhlis

Reputation: 87

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?

Upvotes: 4

Views: 2040

Answers (1)

Trott
Trott

Reputation: 70075

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.

Upvotes: 4

Related Questions