refs #24: fix Version matching again now for matching normal 0.12.1 version

This commit is contained in:
Johannes Rudolph 2012-10-31 15:09:47 +01:00
parent 2f725bf16f
commit f4bd8a409b
1 changed files with 3 additions and 3 deletions

View File

@ -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
}
}
}
}