mirror of https://github.com/sbt/sbt.git
Merge pull request #1300 from cunei/wip-fix-ivy-move
Do not attempt to publish if no artifacts are present
This commit is contained in:
commit
c855dbd854
|
|
@ -255,6 +255,7 @@ object IvyActions
|
|||
|
||||
def publish(module: ModuleDescriptor, artifacts: Seq[(IArtifact, File)], resolver: DependencyResolver, overwrite: Boolean): Unit =
|
||||
{
|
||||
if (artifacts.nonEmpty) {
|
||||
checkFilesPresent(artifacts)
|
||||
try {
|
||||
resolver.beginPublishTransaction(module.getModuleRevisionId(), overwrite);
|
||||
|
|
@ -267,6 +268,7 @@ object IvyActions
|
|||
finally { throw e }
|
||||
}
|
||||
}
|
||||
}
|
||||
private[this] def checkFilesPresent(artifacts: Seq[(IArtifact, File)])
|
||||
{
|
||||
val missing = artifacts filter { case (a, file) => !file.exists }
|
||||
|
|
|
|||
Loading…
Reference in New Issue