diff --git a/publish/do.groovy b/publish/do.groovy index c4bf7eb..749497a 100644 --- a/publish/do.groovy +++ b/publish/do.groovy @@ -104,13 +104,16 @@ def copydirectory(File dirFrom, File dirTo) { def filteredpublish(itempathstopublish, customer) { for (String itempath : itempathstopublish) { - def srcpath = "${releaserepofolder}/${itempath}" - def File srcpathfile = new File(srcpath) - def dstpath = "${filteredreleaserepofolder}/${itempath}" - def File dstpathfile = new File(dstpath) - def dstpathparentdir = dstpathfile.getParentFile() - echo "Copying recursively from ${srcpath} to ${dstpathparentdir.getAbsolutePath()}" - copydirectory(srcpathfile, dstpathparentdir) + def srcpathglob = "${releaserepofolder}/${itempath}" + def srcpaths = new FileNameFinder().getFileNames(srcpathglob) + for (String srcpath: srcpaths) { + def File srcpathfile = new File(srcpath) + def dstpath = "${filteredreleaserepofolder}/${itempath}" + def File dstpathfile = new File(dstpath) + def dstpathparentdir = dstpathfile.getParentFile() + echo "Copying recursively from ${srcpath} to ${dstpathparentdir.getAbsolutePath()}" + copydirectory(srcpathfile, dstpathparentdir) + } } publish(customer, filteredreleaserepofolder) }