Skip to content

Version not bumped if an irrelevant tag exists in latest commit #3757

@adaskos-signal

Description

@adaskos-signal

Hi all.
I'm trying to understand if this is a bug or I'm missing something.
When a tag exists in the latest commit, GitVersion will not parse the commit message and bump version according to the rules.

Minimal steps to reproduce:
(assuming a git repo which currently calculates version as 1.0.0)
Add a bumping commit:

git commit --allow-empty -m "+semver: major"

Now dotnet gitversion /showvariable semver will give the correct version (2.0.0)

If I first tag the commit:

git tag "BLAH"

the same command will give me version 1.0.1 although the tag has no semantic versioning.

This has implications in our CI build and I don't believe it's the expected behavior.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions