Add a new meta walker and test it
This commit is contained in:
parent
a89688e44f
commit
e7dace6cb0
2 changed files with 31 additions and 0 deletions
17
build/integrity.groovy
Normal file
17
build/integrity.groovy
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
def check(buildmeta) {
|
||||
def results = [
|
||||
'good': true,
|
||||
'comment': '',
|
||||
]
|
||||
|
||||
// Walk the meta looking for different versions of the same components
|
||||
def allmeta = buildmeta.allrelatedmeta()
|
||||
echo "All meta:"
|
||||
for (meta in allmeta) {
|
||||
echo meta.componentversionuniqueidentifier()
|
||||
}
|
||||
return results
|
||||
}
|
||||
|
||||
return this
|
||||
|
|
@ -847,6 +847,20 @@ class MetaInfo extends GISJsonSerialised {
|
|||
return releasemetaversionuniquecollection
|
||||
}
|
||||
|
||||
ArrayList<MetaInfo> walkrelated(ArrayList<MetaInfo> metacollection) {
|
||||
metacollection.add(this)
|
||||
for (relatedmetainfo in associatedmeta) {
|
||||
MetaInfo othermeta = relatedmetainfo.meta
|
||||
metacollection = othermeta.walkrelated(metacollection)
|
||||
}
|
||||
return metacollection
|
||||
}
|
||||
|
||||
ArrayList<MetaInfo> allrelatedmeta() {
|
||||
ArrayList<MetaInfo> metacollection = new ArrayList<MetaInfo>()
|
||||
return walkrelated(metacollection)
|
||||
}
|
||||
|
||||
MetaInfo getNewMetaObject(script) {
|
||||
return new MetaInfo(script)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue