mirror of
https://github.com/turbot/steampipe.git
synced 2025-12-19 18:12:43 -05:00
- JSON output format has changed to move the rows to under a `rows` property, with timing information under the `metadata` property - Update timing display to show rows returned and rows fetched, as well as adding verbose mode which lists all scans - Use enums for output mode and timing mode - timing is now either `on`, `off` or `verbose` - Bugfix: ensure error is returned from ExecuteSystemClientCall. Closes #4246
23 lines
766 B
Bash
Executable File
23 lines
766 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
# This script accepts a patch format and evaluates the diffs if any.
|
|
patch_file=$1
|
|
|
|
patch_keys=$(echo $patch_file | jq -r '. | keys[]')
|
|
|
|
for i in $patch_keys; do
|
|
op=$(echo $patch_file | jq -r -c ".[${i}]" | jq -r ".op")
|
|
path=$(echo $patch_file | jq -r -c ".[${i}]" | jq -r ".path")
|
|
value=$(echo $patch_file | jq -r -c ".[${i}]" | jq -r ".value")
|
|
|
|
# ignore the diff of paths 'end_time', 'start_time' and 'schema_version',
|
|
# print the rest
|
|
if [[ $op != "test" ]] && [[ $path != "/end_time" ]] && [[ $path != "/start_time" ]] && [[ $path != "/schema_version" ]] && [[ $path != "/metadata"* ]]; then
|
|
if [[ $op == "remove" ]]; then
|
|
echo "key: $path"
|
|
echo "expected: $value"
|
|
else
|
|
echo "actual: $value"
|
|
fi
|
|
fi
|
|
done |