Add filtered publishing
This commit is contained in:
parent
f9a078c895
commit
36ca33077f
1 changed files with 8 additions and 3 deletions
|
|
@ -104,9 +104,14 @@ def copydirectory(File dirFrom, File dirTo) {
|
|||
|
||||
def filteredpublish(itempathstopublish, customer) {
|
||||
for (String itempath : itempathstopublish) {
|
||||
// Convert glob wildcard paths to real paths
|
||||
echo "Finding files at base folder: ${releaserepofolder} and glob filter: ${itempath}"
|
||||
def srcpaths = new FileNameFinder().getFileNames(releaserepofolder, itempath)
|
||||
def defaultsrcpath = "${releaserepofolder}/${itempath}"
|
||||
def srcpaths = [ defaultsrcpath ]
|
||||
if (itempath.endsWith('**') { // Convert glob wildcard paths to real paths
|
||||
File srcfilepath = new File(defaultsrcpath).getParentFile()
|
||||
def globpattern = '**'
|
||||
echo "Finding files at base folder: ${srcfilepath} and glob filter: ${globpattern}"
|
||||
srcpaths = new FileNameFinder().getFileNames(releaserepofolder, globpattern)
|
||||
}
|
||||
echo "Paths found: ${srcpaths}"
|
||||
for (String srcpath: srcpaths) {
|
||||
def File srcpathfile = new File(srcpath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue