Skip to content

GitVersion produces different BuildMetaData once commit is tagged #1397

Closed
@sebastianlux

Description

@sebastianlux

Repro Steps
First commit
Second commit <- Tagged with 1.2.0
Third commit <- pump minor via commit msg
Fourth commit

->Fourth commit now produces version number 1.3.0+2
-> Now tag the fourth commit with v1.3.0, aka we have released 1.3.0+2

Expected
When building the fourth commit, the exact same version information are produced by GitVersion, meaning 1.3.0+2

Actual
The fourth commit produces version information without any BuildMetaData, meaning the +2 is missing.

We usually take a build, test it, release it, and then tag the commit as released.
We do not know before the actual test whether we want to release (aka tag) the commit or not. But with this approach we are forced to tag the commit before the actual test to ensure that the version number of the commit does not change.

Edit:
Tested with GitVersion 3.6.5 and 4.0.0-beta0012

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions