Ranjan Kumar
Ranjan Kumar

Reputation: 499

Gitversion - what tag-prefix does

According to official GitVersion documentation (https://gitversion.readthedocs.io/en/latest/input/docs/configuration/),

tag-prefix is a regex which is used to trim git tags before processing (eg v1.0.0). Default is [vV] though this is just for illustrative purposes as we do a IgnoreCase match and could be v.

Questions:

  1. What tag-prefix does?
  2. Is there a way to see/verify if tag-prefix is working fine or not without CI/CD

Upvotes: 4

Views: 2534

Answers (1)

VonC
VonC

Reputation: 1328982

What tag-prefix does?

This is to get the version number without any kind of prefix (which is not a number).

It can be overridden with:

GitVersion.exe /output json /overrideconfig tag-prefix=custom

That is one way to check if it has any effect: override it with a dummy value and see if the version extracted is "wrong".

The OP Ranjan Kumar adds in the comments:

tag-prefix is a regex that fetches the semantic version from your git tag.
So once you release your change make sure to create a Git tag with released version.

Upvotes: 4

Related Questions