-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgen-docs.sh
More file actions
executable file
·25 lines (22 loc) · 879 Bytes
/
gen-docs.sh
File metadata and controls
executable file
·25 lines (22 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env sh
# -----------------------------------------------------------------------------
# Generate Terraform DOcs
# -----------------------------------------------------------------------------
# Author : Dwi Fahni Denni
# License : Apache v2
# -----------------------------------------------------------------------------
set -euxo pipefail
CURRENT_PATH=`pwd`
# LIST_FOLDERS=`ls -d -R -- */ | cut -f1 -d'/'`
LIST_FOLDERS=`find terraform* -type d`
for FOLDER in $LIST_FOLDERS; do
echo "------------------------------------------------------"
echo " Create Docs: $CURRENT_PATH/$FOLDER"
echo "------------------------------------------------------"
echo "> terraform-docs markdown table --output-file README.md . "
cd $CURRENT_PATH/$FOLDER
terraform-docs markdown table --output-file README.md .
echo "- DONE -"
done
echo ""
echo "- ALL DONE -"