Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env sh
set -e
RET=0
while read OLD NEW REFNAME ; do
files=$(git ls-tree -r --name-only $NEW)
for file in $files ; do
[[ $file =~ ".yaml" ]] || continue
contents=$(git show $NEW:$file)
echo "${contents}" | python -c 'import yaml,sys;yaml.load(sys.stdin.read())' &>/dev/null
[ $? -eq 0 ] || RET=$?
done
done
exit $RET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.