rtimush / sbt-updates

sbt plugin that can check Maven and Ivy repositories for dependency updates
BSD 3-Clause "New" or "Revised" License
761 stars 55 forks source link

Change the ordering of pre-release identifiers #129

Closed fthomas closed 5 years ago

fthomas commented 5 years ago

This changes the ordering of alphanumeric identifiers in versions so that some identifiers are not ordered lexicographically. Identifiers that are handled differently are: (SNAP, SNAPSHOT) < ALPHA < BETA < M < RC. The motivation for this change is to report a version like 3.1.0-RC3 as an update for 3.1.0-SNAP13.

The change from Int to BigInt in parsePart has been made so that the pre-release identifier in 1.0.0-20131213005945 is treated as numeric. It is currently not because "20131213005945".toInt throws an exception. Without this change, the version above would be greater than 1.0.0-alpha which would lead to a test failure.

Closes #128.

fthomas commented 5 years ago

I've published this change locally and verified that it works for ScalaTest's versions:

[info]   org.scalatest:scalatest:test   : 3.1.0-SNAP13 -> 3.1.0-RC3 -> 3.2.0-M1
rtimush commented 5 years ago

Thanks, this looks very nice!