GitVersion seems to incorrectly generate versions for hotfix branches

Created on 12 May 2020  路  4Comments  路  Source: GitTools/GitVersion

Describe the bug

It used to generate a version number as in:

4.0.2-beta20

Now it's generating

4.0.2-beta1+19

Expected Behavior

Generate 4.0.2-beta20

Actual Behavior

Generate 4.0.2-beta1+19

Possible Fix

Will investigate

bug

Most helpful comment

Oh no, the reason is that the "hotfix" is only partly done. Because of the config file name change from GitVersionConfig.yaml => GitVersion.yml, it was using the defaults.

I am sorry and stand correctly, all my fault, I should have checked this... @asbjornu Where should I go to buy you a beer for the false blaming? I checked your blog and GitHub account, couldn't find anything...

All 4 comments

To test I am using this command line:

    "GitVersionExe": {
        "commandName": "Project",
        "commandLineArgs": "/output buildserver -verbosity debug",
        "workingDirectory": "C:\\Source\\Orc.NuGetExplorer"
    }

On this commit: https://github.com/WildGums/Orc.NuGetExplorer/commit/a26985679f4e9ffe480a132a0fa328335862c673

It correctly picks this part of the configuration:

            ApplyBranchDefaults(config, GetOrCreateBranchDefaults(config, Config.HotfixBranchKey), Config.HotfixBranchRegex,
                new List<string>
                    { "develop", "master", "support" },
                defaultTag: "beta",
                defaultIncrementStrategy: IncrementStrategy.Patch);

Which clearly states Patch strategy. Then why did it work before (according to our devs)? Investigating...

Oh no, the reason is that the "hotfix" is only partly done. Because of the config file name change from GitVersionConfig.yaml => GitVersion.yml, it was using the defaults.

I am sorry and stand correctly, all my fault, I should have checked this... @asbjornu Where should I go to buy you a beer for the false blaming? I checked your blog and GitHub account, couldn't find anything...

Glad you figured it out, @GeertvanHorrik! We've all been there! :)

Was this page helpful?
0 / 5 - 0 ratings