sbt-typelevel icon indicating copy to clipboard operation
sbt-typelevel copied to clipboard

Sort prereleases by number within them (e.g., M9 < M10)

Open rossabaker opened this issue 4 years ago • 3 comments

Context: https://github.com/typelevel/sbt-typelevel/pull/12/files/ddf26e78666fdce3953581dd99e7a49ea79d4111#diff-f515c6fb650430625373f4dee21cd53c79e9464b0ab728b8fa02b25ee2dd6f47

rossabaker avatar Dec 30 '21 17:12 rossabaker

It's hard/impossible to anticipate all pre-release versioning schemes, so my suggestion is we support:

  1. the Ms and RCs, which are used by Scala itself and several typelevel projects
  2. the output of git describe, which is tag[-distance]-hash (this is what the built-in versioning emulates).

armanbilge avatar Dec 30 '21 17:12 armanbilge

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

armanbilge avatar Jan 03 '22 16:01 armanbilge

I bet steward does something smart with version sorting actually.

armanbilge avatar Jan 08 '22 22:01 armanbilge