Add filtered publishing
This commit is contained in:
parent
df095fec96
commit
889d2b8797
1 changed files with 6 additions and 6 deletions
|
|
@ -88,7 +88,7 @@ def publish(String customer, String finalreleaserepofolder = releaserepofolder)
|
|||
|
||||
def copydirectory(File dirFrom, File dirTo) {
|
||||
if (!dirTo.exists()) {
|
||||
dirTo.mkdir();
|
||||
dirTo.mkdirs();
|
||||
}
|
||||
dirFrom.eachFile(FILES) { File source ->
|
||||
File target = new File(dirTo, source.getName())
|
||||
|
|
@ -103,12 +103,12 @@ def copydirectory(File dirFrom, File dirTo) {
|
|||
def filteredpublish(itempathstopublish, customer) {
|
||||
for (String itempath : itempathstopublish) {
|
||||
def srcpath = "${releaserepofolder}/${itempath}"
|
||||
File srcpathfile = new File(srcpath)
|
||||
def File srcpathfile = new File(srcpath)
|
||||
def dstpath = "${filteredreleaserepofolder}/${itempath}"
|
||||
File dstpathfile = new File(dstpath)
|
||||
def dstpathdirname = dstpathfile.getParent()
|
||||
echo "Copying recursively from ${srcpath} to ${dstpath}"
|
||||
copydirectory(srcpathfile, dstpathfile)
|
||||
def File dstpathfile = new File(dstpath)
|
||||
def dstpathparentdir = dstpathfile.getParentFile()
|
||||
echo "Copying recursively from ${srcpath} to ${dstpathparentdir.getName()}"
|
||||
copydirectory(srcpathfile, dstpathparentdir)
|
||||
}
|
||||
publish(customer, filteredreleaserepofolder)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue