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

Version is not incrementing on develop after creating the release branch #3149

Open
mouradchama opened this issue Jul 6, 2022 · 7 comments
Labels
Milestone

Comments

@mouradchama
Copy link

mouradchama commented Jul 6, 2022

Hi,

Describe the bug
I'm facing an issue with GitVersion, I'm following the GitFlow strategy, this is my GitVersion file:

next-version: 3.0.0
update-build-number: true
assembly-informational-format: '{SemVer}'
branches:
  develop:
    tag: beta
  feature:
    mode: ContinuousDeployment
  release:
    tag: rc
    increment: Minor
    track-merge-target: true
  main:
    track-merge-target: true
  hotfix:
    tag: rc

The meta data was incrementing until I created the release branch:
From the release branch I have the right versions (3.0.0-rc1, 3.0.0-rc2 ....), but from develop GitVersion continue using the 3.0.0-beta.x, without incrementing the minor.
The stable package (merge release into master) is not created yet.
The release name does not include the version (the name is : Releases/R2207), I'm taging the release branch after each build.

Expected Behavior

On develop I expect versions: 3.1.0-beta.1

Actual Behavior

3.0.0-beta.1

Your Environment

Azure Devops
GitVersion 5.10.3

  • Version Used:
  • Operating System and version : Ubuntu 20.04.4
@mouradchama mouradchama added the bug label Jul 6, 2022
@asbjornu
Copy link
Member

asbjornu commented Jul 19, 2022

Remove next-version, add a git tag 3.0.0 on an appropriate commit and try again, please.

@HHobeck
Copy link
Contributor

HHobeck commented Sep 21, 2022

Could you please create an integration test and specify your actual scenario so we are knowing what your would like to achieve?

    [Test]
    public void __Just_A_Test__()
    {
        string yaml = @"...";

        var configuration = ConfigSerializer.Read(new StringReader(yaml));

        using var fixture = new EmptyRepositoryFixture();

        fixture.MakeATaggedCommit("2.0.0");

        // ✅ succeeds as expected
        fixture.AssertFullSemver("2.0.0", configuration);

        // ❌ expected: ...
        fixture.AssertFullSemver("...", configuration);
    }

@mouradchama
Copy link
Author

mouradchama commented Dec 14, 2022

Here the test with what I expect :

    [Test]
    public void TestMethod1()
    {
        var yaml = @"branches:
                          develop:
                            tag: beta
                          release:
                            tag: rc
                          hotfix:
                            tag: rc";


        var configuration = ConfigurationSerializer.Read(new StringReader(yaml));

        using var fixture = new EmptyRepositoryFixture();
        fixture.MakeACommit("one");
        fixture.BranchTo("releases/R2301");
        fixture.MakeATaggedCommit("1.0.0-RC.1");
        
        //fixture.Checkout("main");  <============= it works if I uncomment this 2 lines
        //fixture.ApplyTag("1.0.0");

        fixture.BranchTo("develop");
        fixture.MakeACommit("two");
        
        fixture.AssertFullSemver("1.1.0-beta.1", configuration);

    }

I would like to switch to the version 1.1 in develop event if the release is not merged yet into master.

@HHobeck
Copy link
Contributor

HHobeck commented Mar 3, 2023

Hi @mouradchama. Thank you for providing the integration test. What would be your expectation on the develop branch if the releases/R2301 branch has not been merged to develop? To name your branch like release/1.0.0 is not an option for you? Please take a look to the following documentation: https://gitversion.net/docs/learn/branching-strategies/gitflow/examples#minor-release-branches.

@HHobeck HHobeck added feature and removed bug labels Mar 3, 2023
@HHobeck HHobeck changed the title [Bug] Version is not incrementing on develop after creating the release branch Version is not incrementing on develop after creating the release branch Mar 3, 2023
@HHobeck HHobeck added this to the 6.x milestone Mar 18, 2023
@HHobeck
Copy link
Contributor

HHobeck commented Mar 18, 2023

I think this issue is related to #2973.

@github-actions
Copy link

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 Jun 27, 2023
@arturcic arturcic removed the stale label Jun 30, 2023
@github-actions
Copy link

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 Sep 29, 2023
@arturcic arturcic removed the stale label Sep 29, 2023
@arturcic arturcic added stale and removed stale labels Oct 30, 2023
@HHobeck HHobeck modified the milestones: 6.x, 7.x Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants