Open rickymohk opened 1 year ago
This version of squirrel does not support semver2 syntax in several places. The StubExecutable, old Nuget library, and the code you found all expect semver1. It is a fairly big change to fix this in all places - and it's something that has been fixed in my fork.
Thank you for explaining. I think I would explicitly rename my nupkg files then.
Squirrel version(s) Squirrel.Windows 2.0.1
Description I am using electron-forge, which uses electron-winstaller which uses Squirrel.Windows 2.0.1, to try to build delta nupkg. My app version string follows the semver standard like 2.0.0-rc.2, with dot separated prerelease identifiers. It throws exception in SyncRelease. This is because the regex in https://github.com/Squirrel/Squirrel.Windows/blob/5ee2566c4b0a847a17926dfb3d840ec7159651fa/src/Squirrel/ReleaseExtensions.cs#L14 does not correctly capture the version string. It does not account for the "." character in the prerelease part, let alone the "+" character for the build metadata part.
Steps to recreate
Expected behavior version string should be "2.0.0-rc.2"
Actual behavior version string become "2"
Additional information Why don't use the suggested regex from semver? https://semver.org/spec/v2.0.0.html#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string