Mark all components below a released parent component as released - save time

This commit is contained in:
Dan Hawkins 2022-03-28 17:12:23 +01:00
commit 48b0c525de

View file

@ -710,11 +710,13 @@ class MetaInfo extends GISJsonSerialised {
associatedmeta = new ArrayList<RelatedMetaInfo>()
}
void markreleased() {
void markreleased(boolean recursively = true) {
//script.echo("Marking product: ${productinfo.productname} component: ${productinfo.subcomponentname} as released")
releaseinfo.markreleased()
for (associated in associatedmeta) {
associated.markreleased()
if (recursively) {
for (associated in associatedmeta) {
associated.markreleased()
}
}
}
@ -1012,7 +1014,7 @@ class MetaInfo extends GISJsonSerialised {
}
if (ii.markasreleased) {
mi.markreleased()
mi.markreleased(false)
}
def childmetainfo = [
@ -1033,7 +1035,7 @@ class MetaInfo extends GISJsonSerialised {
if (!relatedmetainfo.format || relatedmetainfo.format == '0.1') {
def MetaInfo othermeta = relatedmetainfo.meta
if (this.releaseinfo.released) {
othermeta.markreleased()
othermeta.markreleased(false)
}
def String nextgatheredpath = (ii.gatheredpath == '' ? relatedmetainfo.offsetpath : "${ii.gatheredpath}/${relatedmetainfo.offsetpath}")
def String nextgatheredmetapath = (ii.gatheredmetapath == '' ? relatedmetainfo.offsetpath : "${ii.gatheredmetapath}/${relatedmetainfo.offsetpath}")
@ -1085,7 +1087,7 @@ class MetaInfo extends GISJsonSerialised {
} else if (!relatedmetainfo.format || relatedmetainfo.format == '0.1') {
def MetaInfo othermeta = relatedmetainfo.meta
if (this.releaseinfo.released) {
othermeta.markreleased()
othermeta.markreleased(false)
}
def String nextgatheredpath = (ii.gatheredpath == '' ? relatedmetainfo.offsetpath : "${ii.gatheredpath}/${relatedmetainfo.offsetpath}")
def String nextgatheredmetapath = (ii.gatheredmetapath == '' ? relatedmetainfo.offsetpath : "${ii.gatheredmetapath}/${relatedmetainfo.offsetpath}")