GIS-1621 - Allow installer builder handle a list of artifact keys or a single string

This commit is contained in:
Dan Hawkins 2019-07-30 22:48:18 +01:00
commit 6b7eb941a4

View file

@ -28,11 +28,16 @@ def Map artifactsImporter(meta, artifactDetails, installerDetails) {
def importer = load("${autobuilder.commonscripts()}/import/importer.groovy")
for (installer in toBuild) {
def artifactKey = installerDetails.get(installer)[1]
(sourceProject, sourceselector, destFolder, incrementversionnumber, toCopy, notToCopy, binariesFolders) = artifactDetails.get(artifactKey)
if (artifactFetched.get(artifactKey) == null) {
def importmeta = importer.artifactimport(meta, sourceProject, sourceselector, destFolder, incrementversionnumber, toCopy, notToCopy)
artifactFetched.put(artifactKey, importmeta)
def artifactKeys = installerDetails.get(installer)[1]
if (obj instanceof java.lang.Integer) {
artifactKeys = [ artifactKeys ]
}
for (artifactKey in artifactKeys) {
(sourceProject, sourceselector, destFolder, incrementversionnumber, toCopy, notToCopy, binariesFolders) = artifactDetails.get(artifactKey)
if (artifactFetched.get(artifactKey) == null) {
def importmeta = importer.artifactimport(meta, sourceProject, sourceselector, destFolder, incrementversionnumber, toCopy, notToCopy)
artifactFetched.put(artifactKey, importmeta)
}
}
}
return artifactFetched