Gitversion - 标签前缀的作用

Gitversion - what tag-prefix does

根据官方 GitVersion 文档 (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.

问题:

  1. 标签前缀有什么作用?
  2. 在没有 CI/CD
  3. 的情况下,是否有办法 see/verify 如果标签前缀是否正常工作

What tag-prefix does?

这是获取没有任何前缀(不是数字)的版本号。

can be overridden 具有:

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

这是检查它是否有任何影响的一种方法:用虚拟值覆盖它并查看提取的版本是否“错误”。

OP Ranjan Kumar adds in :

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.