Skip to content

Commit

Permalink
Reverse order of and 'md' in execution of terraform-docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
metmajer committed Oct 20, 2018
1 parent a788a9f commit 4ca61b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terraform_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ terraform_docs() {
continue
fi

terraform-docs md "$args" ./ > "$tmp_file"
terraform-docs "$args" md ./ > "$tmp_file"

# Replace content between markers with the placeholder - https://stackoverflow.com/questions/1212799/how-do-i-extract-lines-between-two-line-delimiters-in-perl#1212834
perl -i -ne 'if (/BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK/../END OF PRE-COMMIT-TERRAFORM DOCS HOOK/) { print $_ if /BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK/; print "I_WANT_TO_BE_REPLACED\n$_" if /END OF PRE-COMMIT-TERRAFORM DOCS HOOK/;} else { print $_ }' "$text_file"
Expand Down

0 comments on commit 4ca61b1

Please sign in to comment.