diff --git a/build/integrity.groovy b/build/integrity.groovy new file mode 100644 index 0000000..3f658a8 --- /dev/null +++ b/build/integrity.groovy @@ -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 \ No newline at end of file diff --git a/meta/folder.groovy b/meta/folder.groovy index e2b3015..63e2fa5 100644 --- a/meta/folder.groovy +++ b/meta/folder.groovy @@ -847,6 +847,20 @@ class MetaInfo extends GISJsonSerialised { return releasemetaversionuniquecollection } + ArrayList walkrelated(ArrayList metacollection) { + metacollection.add(this) + for (relatedmetainfo in associatedmeta) { + MetaInfo othermeta = relatedmetainfo.meta + metacollection = othermeta.walkrelated(metacollection) + } + return metacollection + } + + ArrayList allrelatedmeta() { + ArrayList metacollection = new ArrayList() + return walkrelated(metacollection) + } + MetaInfo getNewMetaObject(script) { return new MetaInfo(script) }