mirror of https://github.com/sbt/sbt.git
refs #24: fix Version matching again now for matching normal 0.12.1 version
This commit is contained in:
parent
2f725bf16f
commit
f4bd8a409b
|
|
@ -177,9 +177,9 @@ object Plugin extends sbt.Plugin {
|
|||
|
||||
val VersionPattern = """(\d+)\.(\d+)\.(\d+)(?:-(.*))?""".r
|
||||
object Version {
|
||||
def unapplySeq(str: String): Option[(Int, Int, Int, Seq[String])] = str match {
|
||||
case VersionPattern(major, minor, fix, appendix) => Some((major.toInt, minor.toInt, fix.toInt, Option(appendix).toSeq))
|
||||
def unapply(str: String): Option[(Int, Int, Int, Option[String])] = str match {
|
||||
case VersionPattern(major, minor, fix, appendix) => Some((major.toInt, minor.toInt, fix.toInt, Option(appendix)))
|
||||
case _ => None
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue