initial commit

This commit is contained in:
mr0xb 2025-12-05 14:16:17 -05:00
commit 62156a1d85
9 changed files with 68 additions and 0 deletions

10
util/yqdiff Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# This script reliably compares the differences between two YAML files
# even with differeing nested values (useful for Helm values files
# comparisons and more). Note that the resulting diff CANNOT be reliably
# used as a patch against the YAML file since the comments are stripped
# during the comparison.
[[ -z $(command -v yq) ]] && echo "missing yq command" && exit 1
exec diff <(yq 'sort_keys(..) | ... comments=""' -P "$1") <(yq 'sort_keys(..) | ... comments=""' -P "$2")