OrchardCMS / Orchard.Gallery

15 stars 14 forks source link

Orchard Gallery Version Sort Order Incorrect #4

Open davegardner opened 8 years ago

davegardner commented 8 years ago

The new orchard Gallery website does not cope with version numbers where the last component is > 9. Consequently, it thinks version 3.3.5.9 is the latest version when it should be 3.3.5.11. See screenshot.

orchardgallerywrongorder

SzymonSel commented 8 years ago

Yup, looks like alphanumeric instead of numeric ordering

sebastienros commented 8 years ago

Welcome in the beautiful world of Semver v1 vs. Sermver v2. And Nuget uses Sermver v1, as did the gallery v1 because Nuget was also using this gallery. This is why ASP.NET packages for instance have something like 4.0.0.9000 instead of 4.0.0.9 because 4.0.0.10 is actually smaller than 4.0.0.9 with Semver 1. This is to support rc > beta > alpha

Conclusion is that you should only use 3 parts in the version as they work as expected (10 > 9) and the 4th part is in alphanumeric order.