Skip to content

Classic version and MajorMinorPatchMetadata #391

@GeertvanHorrik

Description

@GeertvanHorrik

VariableProvider resets the CommitsSinceTag:

                // For continuous deployment the commits since tag gets promoted to the pre-release number
                semanticVersion.PreReleaseTag.Number = semanticVersion.BuildMetaData.CommitsSinceTag;
                semanticVersion.BuildMetaData.CommitsSinceTag = null;

So the AssemblySemVer will never have the right last number?

  1. Why is it reset to null? Am I not understand the VersioningMode correctly?
  2. A possible fix would be this change in AssemblyVersionsGenerator:
return string.Format("{0}.{1}.{2}.{3}", sv.Major, sv.Minor, sv.Patch, sv.BuildMetaData.CommitsSinceTag ?? sv.PreReleaseTag.Number ?? 0);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions