Unable to use SemVer2 version format
I am trying build an installer using a semver2 compatible version, like so:
4.4.0-preview.60831.51
This is failing to build, with the following error:
"4.4.0-preview.60831.51' is not a valid version string"
Is Squirrel not SemVer2 compliant?
Probably not
I looks like regex there
private static readonly Regex _semanticVersionRegex = new Regex(@"^(?<Version>\d+(\s*\.\s*\d+){0,3})(?<Release>-[a-z][0-9a-z-]*)?$", _flags);
is just not accepting the dot even if https://semver.org/ allows it
it is in vendor\nuget\src\Core\SemanticVersion.cs which comes from https://github.com/anaisbetts/NuGet/blob/50f8d9e438fe948d7109501bd10f6024d0585b70/src/Core/SemanticVersion.cs and is old version of what is now in https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Clients/NuGet.VisualStudio/LegacyTypes/SemanticVersion.cs
The nuget project fork is described "A fork of http://nuget.codeplex.com/ with changes I and others will curate and contribute back to the main project." but I don't think it ever contributed back
There are some differences between those version like normalisation was introduced, so perhaps nuget can deal with it now, also for nuget it is legacy
See PR #865 which adds support for NuGet.SemanticVersion
Hm. My app uses X.Y.Z-SHA versioning, which was working just fine with versions like 0.1.3-fa71bac9. But then I woke up today to a failing build because 0.1.3-41ee5c4c is invalid. Looking at that regex... why does the first character after the - need to be a letter? Why (?<Release>-[a-z][0-9a-z-]*)? and not (?<Release>-[0-9a-z-]*)?