diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-19 09:07:06 +0800 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-19 09:07:06 +0800 |
commit | fbd06c94329655346d265574a7a28b103abdec93 (patch) | |
tree | 5e169d931f04c588bed876254c7c147825848563 | |
parent | a849c89dfde99076902c39f14cefb3b24f9bd5d5 (diff) | |
download | cbt-fbd06c94329655346d265574a7a28b103abdec93.tar.gz cbt-fbd06c94329655346d265574a7a28b103abdec93.tar.bz2 cbt-fbd06c94329655346d265574a7a28b103abdec93.zip |
allow git dependencies on sub builds
-rw-r--r-- | stage2/GitDependency.scala | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/stage2/GitDependency.scala b/stage2/GitDependency.scala index ecd0ee1..f2ac7a6 100644 --- a/stage2/GitDependency.scala +++ b/stage2/GitDependency.scala @@ -11,12 +11,19 @@ object GitDependency{ val GitUrl = "(git:|https:|file:/)//([^/]+)/(.+)".r } case class GitDependency( - url: String, ref: String, subDirectory: Option[String] = None // example: git://github.com/cvogt/cbt.git#<some-hash> + url: String, ref: String, subDirectory: Option[String] = None, // example: git://github.com/cvogt/cbt.git#<some-hash> + pathToNestedBuild: Seq[String] = Seq() )(implicit val logger: Logger, classLoaderCache: ClassLoaderCache, context: Context ) extends DependencyImplementation{ import GitDependency._ override def lib = new Lib(logger) def classLoaderCache = context.classLoaderCache - def moduleKey = this.getClass.getName ++ "(" ++ url ++ subDirectory.map("/" ++ _).getOrElse("") ++ "#" ++ ref ++ ")" + def moduleKey = ( + this.getClass.getName + ++ "(" ++ url ++ subDirectory.map("/" ++ _).getOrElse("") ++ "#" ++ ref + ++ ", " + ++ pathToNestedBuild.mkString(", ") + ++ ")" + ) def transientCache = context.transientCache // TODO: add support for authentication via ssh and/or https // See http://www.codeaffine.com/2014/12/09/jgit-authentication/ @@ -69,7 +76,8 @@ case class GitDependency( DirectoryDependency( context.copy( workingDirectory = checkout ++ subDirectory.map("/" ++ _).getOrElse("") - ) + ), + pathToNestedBuild: _* ) } |