diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-13 14:54:18 -0500 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-13 15:30:06 -0500 |
commit | ada8e5e1d414a02b50962f4405fafccb0698e7d9 (patch) | |
tree | 6c1cc84887df5c80a44c49f336c55210d396598a /stage2/BuildBuild.scala | |
parent | ef519e0d91202ef88443df9425f28889435179e3 (diff) | |
download | cbt-ada8e5e1d414a02b50962f4405fafccb0698e7d9.tar.gz cbt-ada8e5e1d414a02b50962f4405fafccb0698e7d9.tar.bz2 cbt-ada8e5e1d414a02b50962f4405fafccb0698e7d9.zip |
Remove dead code. It does not look like the elses are needed.
Because BuildBuild is only created if there is a build folder.
Diffstat (limited to 'stage2/BuildBuild.scala')
-rw-r--r-- | stage2/BuildBuild.scala | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/stage2/BuildBuild.scala b/stage2/BuildBuild.scala index cf56c3b..cf515bb 100644 --- a/stage2/BuildBuild.scala +++ b/stage2/BuildBuild.scala @@ -37,7 +37,11 @@ trait BuildBuildWithoutEssentials extends BaseBuild{ val managedBuildFile = projectDirectory++"/build.scala" logger.composition("Loading build at " ++ managedBuildDirectory.toString) val build = ( - if(managedBuildFile.exists){ + if( !managedBuildFile.exists ){ + throw new Exception( + "No file build.scala (lower case) found in " ++ projectDirectory.getPath + ) + } else { val contents = new String(Files.readAllBytes(managedBuildFile.toPath)) val cbtUrl = ("cbt:"++GitDependency.GitUrl.regex++"#[a-z0-9A-Z]+").r cbtUrl @@ -70,20 +74,6 @@ trait BuildBuildWithoutEssentials extends BaseBuild{ throw new Exception("You need to define a class Build in build.scala in: "+projectDirectory) } } - } else if( projectDirectory.listFiles.exists( _.getName.endsWith(".scala") ) ){ - throw new Exception( - "No file build.scala (lower case) found in " ++ projectDirectory.getPath - ) - /* - // is this not needed? - } else if( projectDirectory.getParentFile.getName == "build" && projectDirectory.getParentFile.getParentFile.getName == "build" ){ - // can't use essentiasy, when building essentials themselves - new BasicBuild( managedContext ) with BuildBuildWithoutEssentials - */ - } else if( projectDirectory.getParentFile.getName == "build" ){ - new BasicBuild( managedContext ) with BuildBuild - } else { - new BasicBuild( managedContext ) } ) try{ |