adamralph/minver

MinVerBuildMetadata terminates before the first plus sign in the build metadata identifiers

adamralph opened this issue · 1 comments

Version(s)

1.0.0 - 2.4.0

To reproduce

Steps to reproduce the behaviour:

  1. Take a .NET project with MinVer installed in a Git repo
  2. Create a tag named 1.2.3+foo+bar
  3. Set MINVERVERBOSITY to "detailed"
  4. Build the project

Expected behaviour

Standard error contains MinVer: [output] MinVerBuildMetadata=foo+bar.

Actual behaviour

Standard error contains MinVer: [output] MinVerBuildMetadata=foo.

Workarounds

Extract the build metadata from PackageVersion or Version.

Additional context

Thanks to @kojoru for identifying and fixing this bug in #478.

While foo+bar may not be a valid SemVer build metadata identifier, MinVer does not do any kind of SemVer based validation, and it accepts a plus sign in a build metadata identifier. PackageVersion and Version may contain a build metadata identifier containing a plus sign, and MinVerBuildMetadata should containing the same build metadata.

This has been fixed and manually verified in #478. Before closing this issue, a test should be added after the current tests have been moved to a test project.