extra launcher properties paths for missing and unmatched sbt.version

This commit is contained in:
Mark Harrah 2012-05-27 20:03:08 -04:00
parent e8fcdc07e8
commit ba13aec159
1 changed files with 4 additions and 2 deletions

View File

@ -61,6 +61,8 @@ object Configuration
}
def multiPartError[T](firstLine: String, lines: List[T]) = error( (firstLine :: lines).mkString("\n\t") )
def UnspecifiedVersionPart = "Unspecified"
def DefaultVersionPart = "Default"
def DefaultBuildProperties = "project/build.properties"
def SbtVersionProperty = "sbt.version"
val ConfigurationName = "sbt.boot.properties"
@ -77,7 +79,7 @@ object Configuration
def fallbackParts: List[String] = "" :: Nil
def versionParts(version: Option[String]): List[String] =
version match {
case None => fallbackParts
case None => UnspecifiedVersionPart :: fallbackParts
case Some(v) => versionParts(v)
}
def versionParts(version: String): List[String] =
@ -87,7 +89,7 @@ object Configuration
if(m.matches())
subPartsIndices map {_.map(m.group).filter(neNull).mkString(".") }
else
fallbackParts
DefaultVersionPart :: fallbackParts
}
private[this] def subPartsIndices =
(1 :: 2 :: Nil) ::