-
-
Save reavon/c9b82ffc72cb92b085ade0ca8a343fd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eu | |
for file in "$@"; do | |
failed=0 | |
dir=$(dirname ${file}) | |
if ! cmp -s <(terraform-docs md ${dir}) "${dir}/README.md"; then | |
echo "Need to update Terraform docs for: " | |
echo "${dir}" | |
echo "Run: terraform-docs md ${dir} > ${dir}/README.md" | |
failed=1 | |
fi | |
if [ $failed -eq 1 ]; then | |
exit 1 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment