mirror of
https://github.com/semver/semver.git
synced 2026-07-11 08:02:23 -05:00
[GH-ISSUE #368] Comparing semver to non-semver #1141
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SteveL-MSFT on GitHub (May 5, 2017).
Original GitHub issue: https://github.com/semver/semver/issues/368
We've converted to using semver in http://github.com/powershell/powershell, however, for compatibility reasons we have situations where we have to compare our semver against a non-conforming version. For example, check if 6.0.0 is greater than 3.0 as older tools built on older versions of PowerShell only expect major.minor. To do this comarison, we would like to convert 3.0 to 3.0.0 where we assume the patch version is 0. Is this acceptable from a semver standpoint where we moved from major.minor to semver?
@haacked commented on GitHub (May 5, 2017):
Yes.
Semver itself doesn't have anything g to say about this.
But the general idea is you want to translate non-semver versions to Semver and a reasonable approach is that the non-specified versions would be 0. This is an implementation detail of your specific platform. All semver tells you is how to compare versions after you've done the translation.