Skip to content

Instantly share code, notes, and snippets.

@tylerjl
Created August 14, 2014 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tylerjl/3170df3cd7851628286b to your computer and use it in GitHub Desktop.
Save tylerjl/3170df3cd7851628286b to your computer and use it in GitHub Desktop.
#!/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