Sort prereleases by number within them (e.g., M9 < M10)
Context: https://github.com/typelevel/sbt-typelevel/pull/12/files/ddf26e78666fdce3953581dd99e7a49ea79d4111#diff-f515c6fb650430625373f4dee21cd53c79e9464b0ab728b8fa02b25ee2dd6f47
It's hard/impossible to anticipate all pre-release versioning schemes, so my suggestion is we support:
- the Ms and RCs, which are used by Scala itself and several typelevel projects
- the output of
git describe, which istag[-distance]-hash(this is what the built-in versioning emulates).
Found some prior art: https://github.com/scalacenter/versions https://github.com/sbt/librarymanagement/pull/239 https://github.com/scalacenter/scaladex/blob/52c9be0acc4230f8d9ad600ede5900d35a093acc/core/shared/src/main/scala/scaladex/core/model/SemanticVersion.scala
I bet steward does something smart with version sorting actually.