Skip to content

Commit d8345de

Browse files
Added the ability to upload directories in the Gradle plugin.
1 parent bb3c080 commit d8345de

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/PushCloudFoundryHelper.groovy

+6-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ class PushCloudFoundryHelper {
6464
}
6565

6666
void uploadApplication() {
67-
log "Uploading ${file}"
67+
if (file.isDirectory()) {
68+
log "Uploading from ${file}"
69+
} else {
70+
log "Uploading file ${file}"
71+
}
6872

6973
client.uploadApplication(application, file)
7074
}
@@ -74,7 +78,7 @@ class PushCloudFoundryHelper {
7478
}
7579

7680
void ensureFileExists() {
77-
if (!file || !file.isFile()) {
81+
if (!file || !file.exists()) {
7882
throw new GradleException("You must specify a valid file ('${file}' is not valid)")
7983
}
8084
}

0 commit comments

Comments
 (0)