aboutsummaryrefslogtreecommitdiff
path: root/stage2/Lib.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2017-03-04 02:55:14 +0000
committerChristopher Vogt <oss.nsp@cvogt.org>2017-03-04 20:43:13 -0500
commit4bd0255f0a39d87652c032533ce45eb65e8f3b1e (patch)
tree48704575b2b337feeeb457f7ab985fc5912e9c33 /stage2/Lib.scala
parent8d4d1b0f0b984ea39a92094e775e82bbb2bd9863 (diff)
downloadcbt-4bd0255f0a39d87652c032533ce45eb65e8f3b1e.tar.gz
cbt-4bd0255f0a39d87652c032533ce45eb65e8f3b1e.tar.bz2
cbt-4bd0255f0a39d87652c032533ce45eb65e8f3b1e.zip
handle trying to package / publish with no source files via exception
this saves us from having to do conditionals in several places
Diffstat (limited to 'stage2/Lib.scala')
-rw-r--r--stage2/Lib.scala23
1 files changed, 9 insertions, 14 deletions
diff --git a/stage2/Lib.scala b/stage2/Lib.scala
index a0b6605..dbcd06f 100644
--- a/stage2/Lib.scala
+++ b/stage2/Lib.scala
@@ -429,23 +429,18 @@ final class Lib(val logger: Logger) extends Stage1Lib(logger){
}
}
- def publishLocal( sourceFiles: Seq[File], artifacts: Seq[File], mavenCache: File, releaseFolder: String ): Unit = {
- if(sourceFiles.nonEmpty){
- val targetDir = mavenCache ++ releaseFolder.stripSuffix("/")
- targetDir.mkdirs
- artifacts.foreach{ a =>
- val target = targetDir ++ ("/" ++ a.getName)
- System.err.println(blue("publishing ") ++ target.getPath)
- Files.copy( a.toPath, target.toPath, StandardCopyOption.REPLACE_EXISTING )
- }
+ def publishLocal( artifacts: Seq[File], mavenCache: File, releaseFolder: String ): Unit = {
+ val targetDir = mavenCache ++ releaseFolder.stripSuffix("/")
+ targetDir.mkdirs
+ artifacts.foreach{ a =>
+ val target = targetDir ++ ("/" ++ a.getName)
+ System.err.println(blue("publishing ") ++ target.getPath)
+ Files.copy( a.toPath, target.toPath, StandardCopyOption.REPLACE_EXISTING )
}
}
- def publishSigned( sourceFiles: Seq[File], artifacts: Seq[File], url: URL, credentials: Option[String] = None ): Unit = {
- // TODO: make concurrency configurable here
- if(sourceFiles.nonEmpty){
- publish( artifacts ++ artifacts.map(sign), url, credentials )
- }
+ def publishSigned( artifacts: Seq[File], url: URL, credentials: Option[String] = None ): Unit = {
+ publish( artifacts ++ artifacts.map(sign), url, credentials )
}
private def publish(artifacts: Seq[File], url: URL, credentials: Option[String]): Unit = {