Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for terraform-docs 0.8.0 with proper support for Terraform 0.12 syntax (bye-bye awk) #85

Merged
merged 12 commits into from
Jan 21, 2020
Prev Previous commit
Next Next commit
updated formatting
konstantin-recurly committed Jan 16, 2020

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit b3258a0cc2a5e6bfdeee967b9f335275479b127c
16 changes: 8 additions & 8 deletions terraform_docs.sh
Original file line number Diff line number Diff line change
@@ -46,14 +46,14 @@ main() {
}

check_terraform_docs_version() {
readonly currentver="$1"

requiredver="0.8.0"
if [ "$(printf '%s\n' "$requiredver" "$currentver" | sort -V | head -n1)" = "$requiredver" ]; then
echo "1"
else
echo "0"
fi
readonly currentver="$1"

requiredver="0.8.0"
if [ "$(printf '%s\n' "$requiredver" "$currentver" | sort -V | head -n1)" = "$requiredver" ]; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not critical, but try to follow this point from Shell Style Guide by Google - https://google.github.io/styleguide/shell.xml?showone=Test,_%5B_and_%5B%5B#Test,_%5B_and_%5B%5B

Please update to use [[ instead of [.

echo "1"
else
echo "0"
fi
}

terraform_docs() {