Skip to content

Reported Versions Out of Order After Prerelease Tag #1844

Closed
@WalkerCodeRanger

Description

@WalkerCodeRanger

With the following GitVersion.yml

mode: ContinuousDeployment
branches:
  master:
    tag: dev

The table below shows 4 commits on the master branch, oldest to newest. The middle column indicates what tags have been created in git (git tag something). The third column shows the version GitVersion assigns to them.

Commit # Git Tag GitVersion
1 v2.0.0 2.0.0
2 2.0.1-dev.1
3 v2.1.0-rc 2.1.0-rc
4 2.1.0-dev.1

This all seems correct up until commit 4. Notice that according to SemVer 2.0.0 < 2.0.1-dev.1 < 2.1.0-rc, but 2.1.0-rc > 2.1.0-dev1.

After a release git tag, GitVersion increments the version number, but after a prerelease git tag, it doesn't. That makes some sense if tag: '' is set and the new version wil be -rc.X, but doesn't make sense in this case.

I think that if the branch tag setting would cause the current version to be before the previous tag, then the increment should happen.

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