Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Waibel2018-06-29 14:42:33 -0400
committerFlorian Waibel2018-06-29 14:42:33 -0400
commitf23eafff2d176e6dd7bcede856ca37398d584c19 (patch)
treeafbc333917c1ce4ba6a67b78e76d3583b0514074
parent2be32b8fc6d53261e073f145224c82722bb88fd1 (diff)
downloadorg.eclipse.virgo.samples-f23eafff2d176e6dd7bcede856ca37398d584c19.tar.gz
org.eclipse.virgo.samples-f23eafff2d176e6dd7bcede856ca37398d584c19.tar.xz
org.eclipse.virgo.samples-f23eafff2d176e6dd7bcede856ca37398d584c19.zip
Update recipe-custome-virgo
Improve check if runtime tar file is present.
-rw-r--r--recipe-custom-virgo/recipe-custom-virgo-runtime/build.gradle17
1 files changed, 10 insertions, 7 deletions
diff --git a/recipe-custom-virgo/recipe-custom-virgo-runtime/build.gradle b/recipe-custom-virgo/recipe-custom-virgo-runtime/build.gradle
index f300ab1..312a162 100644
--- a/recipe-custom-virgo/recipe-custom-virgo-runtime/build.gradle
+++ b/recipe-custom-virgo/recipe-custom-virgo-runtime/build.gradle
@@ -34,13 +34,16 @@ dependencies {
task unzipRuntime(type: Copy, dependsOn: dockerize) {
outputs.upToDateWhen { false } // always unzip
- def fileNames = new FileNameByRegexFinder().getFileNames("${-> project.buildDir.absolutePath}", /.*\.tar/)
- if (fileNames) {
- def tarFile = fileNames.get(0)
- def outputDir = file("${buildDir}")
-
- from tarTree(tarFile)
- into outputDir
+ def buildDir = project.buildDir
+ if (buildDir != null && buildDir.exists()) {
+ def fileNames = new FileNameByRegexFinder().getFileNames("${-> buildDir.absolutePath}", /.*\.tar/)
+ if (fileNames) {
+ def tarFile = fileNames.get(0)
+ def outputDir = file("${buildDir}")
+
+ from tarTree(tarFile)
+ into outputDir
+ }
}
}

Back to the top