Copy from Atlas Autobuild scripts as a starting point
This commit is contained in:
parent
b9a22c1989
commit
2d66e342df
92 changed files with 11897 additions and 0 deletions
15
Common_scripts/differences/json.groovy
Normal file
15
Common_scripts/differences/json.groovy
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
def comparefiles(importedjsonfile, currentjsonfile) {
|
||||
if (isUnix()) {
|
||||
sh """
|
||||
which jq
|
||||
if [ \$? -ne 0 ]; then exit 1; fi
|
||||
# jq -S sorts json output
|
||||
diff -c <(jq -S . "${importedjsonfile}") <(jq -S . "${currentjsonfile}")
|
||||
"""
|
||||
}
|
||||
else {
|
||||
error "Windows not currently supporting json file comparison"
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
Loading…
Add table
Add a link
Reference in a new issue