You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ContinousDeployment or Mainline mode I would like to use the CommitsSinceVersionSource as PreleaseTag without any additional PrereleaseLabel before it.
In order to achieve that I tried to set the PrereleaseTag to empty but in such case the CommitsSinceVersionSource is not properly processed to the Prerelease properties.
After looking through the code it seems that such behavior might be intended for Mainline mode as there are a lot of tests where by default for FullSemVer is expected format MajorMinorPatch instead of MajorMinorPatch-PrereleaseTag (PrereleaseLabel.PrereleaseNumber).
Is this expected behavior? When there is no PrereleaseLabel, there won't be PrereleaseTag generated from just Number?
Shouldn't CommitsSinceVersionSource taken as PrereleaseNumber generate PrereleaseTag at least for ContinuousDeployment mode, even if PrereleaseLabel is empty?
As it is mentioned in source code comment (VariableProvider.cs, Line 29):
// Continuous Deployment always requires a pre-release tag unless the commit is tagged
Example of the generated properties for ContinuousDeployment:
There is only PrereleaseTag set to the value of CommitsSinceVersionSource, without any formatting.
Even the PrereleaseNumber is not properly returned.
The FullSemVer include only MajorMinorPatch.
The CommitsSinceVersionSource are set as Number for PrereleaseTag properly but in turn the PromotedFromCommits flag is set.
Then the Properties are not properly handled by SemanticVersionFormatValues due to HasTag method in SemanticVersionPreReleaseTag class.
The HasTag returns false due to PromotedFromCommits flag being true and Name being null/empty, in result SemanticVersionFormatValues doesn't return proper values.
Make several commits, and then check the generated output of GitVersion.
The Prerelease properties should not be generated properly.
The FullSemVer doesn't include the PrereleaseTag as well.
Context
In ContinousDeployment or Mainline mode I would like to use the CommitsSinceVersionSource as PreleaseTag without any additional PrereleaseLabel before it. The number of commits is enough without any additional string.
Your Environment
Version Used: 5.3.7+Branch.master.Sha.b22e8726683a0997484b53c5efd54394e93b5306
Operating System and version (Windows 10, Ubuntu 18.04): Windows 10
The text was updated successfully, but these errors were encountered:
I think your request makes sense, @dramdrung. Could you please submit a PR with some tests and perhaps even a fix to just see whether this would break (many) other tests by fixing?
Describe the bug
In ContinousDeployment or Mainline mode I would like to use the CommitsSinceVersionSource as PreleaseTag without any additional PrereleaseLabel before it.
In order to achieve that I tried to set the PrereleaseTag to empty but in such case the CommitsSinceVersionSource is not properly processed to the Prerelease properties.
After looking through the code it seems that such behavior might be intended for Mainline mode as there are a lot of tests where by default for FullSemVer is expected format MajorMinorPatch instead of MajorMinorPatch-PrereleaseTag (PrereleaseLabel.PrereleaseNumber).
Is this expected behavior? When there is no PrereleaseLabel, there won't be PrereleaseTag generated from just Number?
Shouldn't CommitsSinceVersionSource taken as PrereleaseNumber generate PrereleaseTag at least for ContinuousDeployment mode, even if PrereleaseLabel is empty?
As it is mentioned in source code comment (VariableProvider.cs, Line 29):
Example of the generated properties for ContinuousDeployment:
There is only PrereleaseTag set to the value of CommitsSinceVersionSource, without any formatting.
Even the PrereleaseNumber is not properly returned.
The FullSemVer include only MajorMinorPatch.
Expected Behavior
With GitVersion.yml:
The Prelease properties generated should look like this:
In relation to Properties shown below:
Actual Behavior
With GitVersion.yml:
The output generated looks like this:
Possible reason
The CommitsSinceVersionSource are set as Number for PrereleaseTag properly but in turn the PromotedFromCommits flag is set.
Then the Properties are not properly handled by SemanticVersionFormatValues due to HasTag method in SemanticVersionPreReleaseTag class.
The HasTag returns false due to PromotedFromCommits flag being true and Name being null/empty, in result SemanticVersionFormatValues doesn't return proper values.
Steps to Reproduce
Use GitVersion.yml config file:
Make several commits, and then check the generated output of GitVersion.
The Prerelease properties should not be generated properly.
The FullSemVer doesn't include the PrereleaseTag as well.
Context
In ContinousDeployment or Mainline mode I would like to use the CommitsSinceVersionSource as PreleaseTag without any additional PrereleaseLabel before it. The number of commits is enough without any additional string.
Your Environment
The text was updated successfully, but these errors were encountered: