Only attempt to access sshPrivateKey property if present

This commit is contained in:
Chris Beams
2010-11-08 06:54:47 -08:00
parent 79b7342ad9
commit 4aaac0f04b

View File

@@ -206,7 +206,9 @@ uploadArchives {
name = 'sshHost: ' + sshHost // used for debugging
host = sshHost
user = sshUsername
keyFile = sshPrivateKey as File
if (project.hasProperty('sshPrivateKey')) {
keyFile = sshPrivateKey ? sshPrivateKey as File : null
}
addArtifactPattern "${remoteDocsDir}/${archive.archiveName}"
}
}