Add filtered publishing
This commit is contained in:
parent
76f24173a3
commit
7f8b0cf866
1 changed files with 10 additions and 7 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue