Skip to content

Conversation

carlos-vicente
Copy link
Contributor

@carlos-vicente carlos-vicente commented Apr 29, 2020

Description

Changed the pre-release tag formatting to support numeric pre-release tags.

Related Issue

Fixes #2235

Motivation and Context

This will provide the ability to correctly use pre-release tags with the format: Release-..- and getting that correct version on the FullSemVer (and related variables).

How Has This Been Tested?

On a git repo using git flow, on a release branch called release/Release-2.10, tagged with Release-2.10.0-1, the numberic pre-release tag got formatted correctly and got

{ 
  "PreReleaseTag":"1",
  "PreReleaseTagWithDash":"-1",
  "PreReleaseLabel":"",
  "PreReleaseNumber":1,
  "WeightedPreReleaseNumber":1,
  "MajorMinorPatch":"2.10.0",
  "AssemblySemVer":"5.13.0.10",
  "AssemblySemFileVer":"5.13.0.10",
  "FullSemVer":"5.13.0-1"
  // remaining fields omitted
}

using the config:

mode: ContinuousDelivery
tag-prefix: '[Rr]elease-'
assembly-versioning-scheme: MajorMinorPatchTag
assembly-file-versioning-scheme: MajorMinorPatchTag
ignore:
  sha: []
merge-message-formats: {}

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Pre release tag parsing correctly identifies when there is no name, but there is a number, this changes the formatting method and tag verification so that a single pre release number is also considered
@arturcic arturcic requested a review from asbjornu April 30, 2020 11:58
@asbjornu asbjornu merged commit a97cb87 into GitTools:master Apr 30, 2020
@asbjornu
Copy link
Member

Thank you so much for your contributions to GitVersion, @carlos-vicente! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement] Allow for a pre-release tag with just a number, without name
3 participants