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

When using workflow TrunkBased/v1 after version 0.1.9.0 comes 0.1.0.0 #3989

Closed
2 tasks done
mdmoura opened this issue Apr 5, 2024 · 1 comment
Closed
2 tasks done

Comments

@mdmoura
Copy link

mdmoura commented Apr 5, 2024

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

GitVersion package

gittools/actions

GitVersion version

6.0.0-beta.7

Operating system

N/A

What are you seeing?

Using GitVersion on a GitHub action with workflow TrunkBased/v1 the version after 0.1.9.0 is 0.1.0.0

What is expected?

I am expecting the version after 0.1.9.0 would be 0.1.10.0

Steps to Reproduce

I am using GitVersion on a GitHub action as follows:

  - name: Checkout
    uses: actions/checkout@v4
    with:
      fetch-depth: 0

  - name: GitVersion
    uses: gittools/actions/gitversion/setup@v1
    with:
      versionSpec: 6.x
      includePrerelease: true

  - name: Versioning
    uses: gittools/actions/gitversion/execute@v1
    id: versioning
    with:
      useConfigFile: true
      configFilePath: gitversion.yml

And the gitversion.yml is simply:

workflow: TrunkBased/v1

I created the tag v0.1.0 and pushed a few commits.

The version was incremented as follows:

0.1.0.0, 0.1.1.0, 0.1.2.0, ...

But when it reaches 0.1.9.0 the next commit gets the version 0.1.0.0.

@HHobeck
Copy link
Contributor

HHobeck commented Apr 8, 2024

Hi Miguel.

I have tried to reproduce this issue in azure devops without success. The following integration test proofs your scenario and has been executed with the code base of 6.0.0-beta.7 without any problems:

[Test]
public void JustATest()
{
	var configuration = TrunkBasedConfigurationBuilder.New.Build();

	using var fixture = new EmptyRepositoryFixture("main");

	fixture.MakeACommit("A");

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

	fixture.ApplyTag("0.1.0");

	for (int i = 0; i < 10; i++) fixture.MakeACommit();

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

Could you please provide a repository or analyze your scenario in more detail?

@HHobeck HHobeck closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2024
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

2 participants