Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use empty tag in branch specific configuration #3060

Closed
jws305 opened this issue Mar 29, 2022 · 4 comments
Closed

Cannot use empty tag in branch specific configuration #3060

jws305 opened this issue Mar 29, 2022 · 4 comments

Comments

@jws305
Copy link

jws305 commented Mar 29, 2022

The dotnet tool and the Azure Pipeline task are producing different outputs given the same input.

Given a Git graph of:

commit (HEAD)
commit (tag: v2.0.11)
...

And a GitVersion.yml of:

mode: ContinuousDeployment
continuous-delivery-fallback-tag: ci
branches:
  main:
    tag: ''

I get the following output:

{
  "Major": 2,
  "Minor": 0,
  "Patch": 12,
  "PreReleaseTag": "ci.1",
  "PreReleaseTagWithDash": "-ci.1",
  "PreReleaseLabel": "ci",
  "PreReleaseLabelWithDash": "-ci",
  "PreReleaseNumber": 1,
  "WeightedPreReleaseNumber": 55001,
  "BuildMetaData": null,
  "BuildMetaDataPadded": "",
  "FullBuildMetaData": "Branch.main.Sha.cba365c7e2fa53dbf7935b74d780d542b35eca04",
  "MajorMinorPatch": "2.0.12",
  "SemVer": "2.0.12-ci.1",
  "LegacySemVer": "2.0.12-ci1",
  "LegacySemVerPadded": "2.0.12-ci0001",
  "AssemblySemVer": "2.0.12.0",
  "AssemblySemFileVer": "2.0.12.0",
  "FullSemVer": "2.0.12-ci.1",
  "InformationalVersion": "2.0.12-ci.1+Branch.main.Sha.cba365c7e2fa53dbf7935b74d780d542b35eca04",
  "BranchName": "main",
  "EscapedBranchName": "main",
  "Sha": "cba365c7e2fa53dbf7935b74d780d542b35eca04",
  "ShortSha": "cba365c",
  "NuGetVersionV2": "2.0.12-ci0001",
  "NuGetVersion": "2.0.12-ci0001",
  "NuGetPreReleaseTagV2": "ci0001",
  "NuGetPreReleaseTag": "ci0001",
  "VersionSourceSha": "b69e8de1075fd57dbf79ec4a971fb469cc5e7a55",
  "CommitsSinceVersionSource": 1,
  "CommitsSinceVersionSourcePadded": "0001",
  "UncommittedChanges": 1,
  "CommitDate": "2022-03-29"
}

But I would expect to get:

{
  "Major": 2,
  "Minor": 0,
  "Patch": 12,
  "PreReleaseTag": "1",
  "PreReleaseTagWithDash": "",
  "PreReleaseLabel": "",
  "PreReleaseLabelWithDash": "",
  "PreReleaseNumber": null,
  "WeightedPreReleaseNumber": 60000,
  "BuildMetaData": null,
  "BuildMetaDataPadded": "",
  "FullBuildMetaData": "Branch.main.Sha.cba365c7e2fa53dbf7935b74d780d542b35eca04",
  "MajorMinorPatch": "2.0.12",
  "SemVer": "2.0.12",
  "LegacySemVer": "2.0.12",
  "LegacySemVerPadded": "2.0.12",
  "AssemblySemVer": "2.0.12.0",
  "AssemblySemFileVer": "2.0.12.0",
  "FullSemVer": "2.0.12",
  "InformationalVersion": "2.0.12+Branch.main.Sha.cba365c7e2fa53dbf7935b74d780d542b35eca04",
  "BranchName": "main",
  "EscapedBranchName": "main",
  "Sha": "cba365c7e2fa53dbf7935b74d780d542b35eca04",
  "ShortSha": "cba365c",
  "NuGetVersionV2": "2.0.12",
  "NuGetVersion": "2.0.12",
  "NuGetPreReleaseTagV2": "",
  "NuGetPreReleaseTag": "",
  "VersionSourceSha": "b69e8de1075fd57dbf79ec4a971fb469cc5e7a55",
  "CommitsSinceVersionSource": 1,
  "CommitsSinceVersionSourcePadded": "0001",
  "UncommittedChanges": 1,
  "CommitDate": "2022-03-29"
}
@jws305
Copy link
Author

jws305 commented Mar 29, 2022

As a workaround, I am currently using:

mode: ContinuousDeployment
continuous-delivery-fallback-tag: ''
branches:
  main:
    tag: ''
  default:
    regex: .*
    tag: ci
    source-branches:
      - main

@github-actions
Copy link

github-actions bot commented Mar 4, 2023

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs.

@github-actions github-actions bot added the stale label Mar 4, 2023
@HHobeck HHobeck added this to the 6.x milestone Mar 31, 2023
@HHobeck
Copy link
Contributor

HHobeck commented Mar 31, 2023

I think this issue will be solved in the upcoming release v6.x. Please try 6.0.0-beta.1 preview release.

@HHobeck HHobeck closed this as completed Mar 31, 2023
@arturcic arturcic modified the milestones: 6.x, 6.0.0-beta.2 Apr 6, 2023
@arturcic arturcic added improvement and removed stale labels Apr 6, 2023
@arturcic
Copy link
Member

arturcic commented Apr 6, 2023

🎉 This issue has been resolved in version 6.0.0-beta.2 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

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

No branches or pull requests

3 participants