Better auto-generated IDs for default projects. Fixes #554.

For the global plugins project, the default ID is "global-plugins".
For a normal project, the default ID is the name of the build directory.
The ID of a build definition for one of the above appends -build.
This commit is contained in:
Mark Harrah 2013-04-10 20:15:28 -04:00
parent ea48770534
commit 7bda0fad17
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ package sbt
object StringUtilities
{
def normalize(s: String) = s.toLowerCase.replaceAll("""\s+""", "-")
def normalize(s: String) = s.toLowerCase.replaceAll("""\W+""", "-")
def nonEmpty(s: String, label: String)
{
require(s.trim.length > 0, label + " cannot be empty.")