-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0katrinpetrosyan0
committed
Jul 15, 2022
1 parent
da98b7e
commit 1cd4a20
Showing
13 changed files
with
445 additions
and
209 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
#!/bin/bash | ||
echo 'Start git pre-commit hooks and checks... '; | ||
sudo pre-commit run -a; | ||
echo 'End git pre-commit hooks and checks... '; | ||
|
||
echo "Start git pre-commit hooks"; | ||
|
||
echo "Start terraform docs"; | ||
echo 'Start terraform docs'; | ||
for i in `ls -d modules/*/`;do | ||
if ! git diff --cached --quiet "${i}" | ||
if ! git diff --cached --quiet '${i}' | ||
then | ||
echo "Generating doc file: ${i}"; | ||
terraform-docs markdown table --output-file README.md --output-mode inject "${i}"; | ||
echo 'Generating doc file: ${i}'; | ||
terraform-docs markdown table --output-file README.md --output-mode inject '${i}'; | ||
fi | ||
done | ||
echo "End terraform docs"; | ||
echo 'End terraform docs'; | ||
|
||
echo "Start terraform fmt"; | ||
echo 'Start terraform fmt'; | ||
for y in $(find . -name '*.tf' -print) | ||
do | ||
if ! git diff --cached --quiet "${y}" | ||
then | ||
echo "Formatting the file: ${y}"; | ||
terraform fmt -write=true "${y}" | ||
fi | ||
if ! git diff --cached --quiet '${y}' | ||
then | ||
echo 'Formatting the file: "${y}"'; | ||
terraform fmt -write=true '${y}' | ||
fi | ||
done | ||
echo "End terraform fmt"; | ||
|
||
echo "End git pre-commit hooks"; | ||
echo 'End terraform fmt'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.