Convert bat to powershell; Remove debug
This commit is contained in:
parent
b8b6848c96
commit
564ed643ca
1 changed files with 8 additions and 5 deletions
|
|
@ -37,14 +37,17 @@ def comparefiles(importedjsonfile, currentjsonfile) {
|
|||
if (\$lastexitcode -ge 1) { exit 1 }
|
||||
|
||||
# echo Diffing sorted json files
|
||||
diff -c temp1.txt temp2.txt
|
||||
\$el = \$lastexitcode
|
||||
$str1 = Get-Content "temp1.txt"
|
||||
$str2 = Get-Content "temp2.txt"
|
||||
$diff = Compare-Object $str1 $str2
|
||||
if ($diff -ne '') {
|
||||
echo "Difference between JSON files:"
|
||||
echo $diff
|
||||
exit 1
|
||||
}
|
||||
|
||||
Remove-Item temp1.txt
|
||||
Remove-Item temp2.txt
|
||||
|
||||
# echo Diffing result: \$el
|
||||
if (\$el -ge 1) { exit 1 }
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue