-
Notifications
You must be signed in to change notification settings - Fork 653
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
[Bug] Version not generated correct when creating a feature branch from a develop branch #3108
Comments
I believe the problem is that you don't have any commits on [Test]
public void __Just_A_Test__()
{
using var fixture = new EmptyRepositoryFixture();
fixture.Repository.MakeATaggedCommit("1.0.0");
fixture.BranchTo("develop");
fixture.Repository.MakeACommit();
fixture.Checkout("main");
fixture.Repository.MakeACommit();
fixture.Checkout("develop");
fixture.Repository.MakeACommit();
fixture.BranchTo("feature/just-a-test");
fixture.Repository.MakeACommit();
fixture.MergeNoFF("main");
fixture.Repository.MakeACommit();
var configuration = new Config()
{
Branches = new Dictionary<string, BranchConfig>()
{
{ "release", new BranchConfig() { TracksReleaseBranches = true } }
}
};
fixture.AssertFullSemver("1.1.0-just-a-test.1+6", configuration);
} |
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. |
The problem is clear of course git-version doesn’t know which branch the right branch is to use. Because we have two parents on the one hand the main and on the other hand the develop branch. GitVersion takes properly the branch which was least committed. But is this behavior correct? Your proposal gives me the correct number but from the ci pipeline point of view it is not possible because the develop branch is restricted to check-in directly. Thus everything must go via a PR to ensure the stability of the branch. This scenario makes sense, doesn't it? |
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. |
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. |
The trick is to specify the feature branch with increment minor not inherit. |
🎉 This issue has been resolved in version 6.0.0-beta.6 🎉 Your GitReleaseManager bot 📦🚀 |
Describe the bug
Hi there. I'm using the GitFlow branching strategy descripted on this page https://gitversion.net/docs/learn/branching-strategies/gitflow/examples. Because I want to ensure the stability of the develop direct committing is not allowed. Thus I need to go via feature branches and got an unexpected version generation on the following scenario:
That produces the following repository:
with following commit messages:
Expected Behavior
Git Version should generate the semantic version 1.1.0 on feature branch just-a-test in this scenario.
Actual Behavior
The semantic version 1.0.1 will be generated.
Possible Fix
I'm not sure if it is a bug or I have misconfigured something.
Steps to Reproduce
Please take look to the test steps above
Context
I'm using the latest version of GitVersion 5.10.1. My build and deployment pipelines are in AzureDevOps but I can reproduce it locally.
Your Environment
The text was updated successfully, but these errors were encountered: