mirror of https://github.com/sbt/sbt.git
Fix binary version of 3.0.1-RC1
This commit is contained in:
parent
23b7d923af
commit
c98e51418f
|
|
@ -75,11 +75,11 @@ object CrossVersionUtil {
|
|||
}
|
||||
|
||||
private[sbt] def binaryScala3Version(full: String): String = full match {
|
||||
case ReleaseV(maj, _, _, _) => maj
|
||||
case CandidateV(maj, min, _, _) if min.toLong > 0 => maj
|
||||
case MilestonV(maj, min, _, _) if min.toLong > 0 => maj
|
||||
case BinCompatV(maj, min, patch, stage, _) => binaryScala3Version(s"$maj.$min.$patch$stage")
|
||||
case _ => full
|
||||
case ReleaseV(maj, _, _, _) => maj
|
||||
case CandidateV(maj, min, patch, _) if min.toLong > 0 || patch.toLong > 0 => maj
|
||||
case MilestonV(maj, min, patch, _) if min.toLong > 0 || patch.toLong > 0 => maj
|
||||
case BinCompatV(maj, min, patch, stage, _) => binaryScala3Version(s"$maj.$min.$patch$stage")
|
||||
case _ => full
|
||||
}
|
||||
|
||||
def binaryScalaVersion(full: String): String = {
|
||||
|
|
|
|||
|
|
@ -237,6 +237,15 @@ class CrossVersionTest extends UnitSpec {
|
|||
it should "for 3.1.0 return 3" in {
|
||||
binaryScalaVersion("3.1.0") shouldBe "3"
|
||||
}
|
||||
it should "for 3.0.1-RC1 return 3" in {
|
||||
binaryScalaVersion("3.0.1-RC1") shouldBe "3"
|
||||
}
|
||||
it should "for 3.0.1-M1 return 3" in {
|
||||
binaryScalaVersion("3.0.1-M1") shouldBe "3"
|
||||
}
|
||||
it should "for 3.0.1-RC1-bin-SNAPSHOT return 3" in {
|
||||
binaryScalaVersion("3.0.1-RC1") shouldBe "3"
|
||||
}
|
||||
|
||||
private def patchVersion(fullVersion: String) =
|
||||
CrossVersion(CrossVersion.patch, fullVersion, "dummy") map (fn => fn("artefact"))
|
||||
|
|
|
|||
Loading…
Reference in New Issue