Implement when PreleaseLabel is empty, the PreleaseTag is generated correctly#3447
Conversation
5f11137 to
45ea2c0
Compare
|
I'm done please review and merge to main. |
|
Is there any reason to have 4 new interfaces If we take in consideration your suggestion regarding public enum VersioningMode
{
ManuallyDeployment, // previously ContinuousDelivery
ContinuousDelivery, // previously ContinuousDeployment
ContinuousDeployment, // new
Trunkbased // previously Mainline??
}I would rather have a |
Yep good point. At this moment I have separated the behavior which not aligns with the Do you have something like this in mind? public interface IVersionCalculator
{
VersioningMode VersioningMode { get; }
SemanticVersion Calculate(NextVersion nextVersion);
}
public IVersionCalculator GetSpecificVersionCalculator(VersioningMode versioningMode)
{
return _serviceProvider.GetServices<IVersionCalculator>().Single(
element => element.VersioningMode == versioningMode
);
} |
Exactly, in this case we don't need that many interfaces for the all the modes, and we have only the implementations and one interface |
So what do you think @HHobeck should we make those changes to the VersionMode, or put that change into another PR? |
Agreed. |
I think it is better to do this in a separate PR. You mentioned already to do this after the beta.2 release. Which is fine with me. |
45ea2c0 to
263eb78
Compare
|
Also we need to discuss the naming. IMO the naming of VersioningMode is missleading. Maybe a better name might be DeploymentMode. What do you think? In addition what do you like more Trunkbased or Mainline? public enum DeploymentMode
{
ManuallyDeployment, // previously ContinuousDelivery
ContinuousDelivery, // previously ContinuousDeployment
ContinuousDeployment, // new
Trunkbased // previously Mainline??
} |
263eb78 to
2ef39cd
Compare
|
@asbjornu do you agree with this PR to be merged? |
6d0edc6 to
ae9cec8
Compare
15a0970 to
7f7163c
Compare
asbjornu
left a comment
There was a problem hiding this comment.
This is great stuff. The only thing I'm a bit wary about is the change from 1.0.1+46 to 1.0.1-46 unless label is set to null. Not because the change doesn't make sense, I think it's a good default, but because it's a breaking change. However, I think we should test this change out in the community and see what feedback we get.
asbjornu
left a comment
There was a problem hiding this comment.
Just a couple of typos, then I think this is good.
|
Thank you @HHobeck for your contribution! |
@asbjornu I've been trying to make it so it doesn't output a prerelease number on my side, but setting "label" to null under GitVersion.yml doesn't work. This markdown file is also mentioning a similar solution, but still I can't figure it out: https://github.com/GitTools/GitVersion/blob/main/BREAKING_CHANGES.md.
When removing the label, I got that: Would it be possible to help me so that I have for the variable FullSemVer, the value '1.0.0+37' instead of '1.0.0-37'? Thanks in advance! |
|
Thank you @HHobeck for your contribution! |





Fix [Bug] When PreleaseLabel is empty, the PreleaseTag is not correctly generated #2347
Close #2347
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Checklist: