-
Notifications
You must be signed in to change notification settings - Fork 73
/
Makefile
22 lines (19 loc) · 795 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Some of the targets in this file were taken from the terragrunt project:
# https://github.com/gruntwork-io/terragrunt
fmt:
terraform fmt -recursive
clean:
find . -type f -name "*.tfstate*" -prune -exec rm -rf {} \;
find . -type f -name "*.terraform.lock.hcl" -prune -exec rm -rf {} \;
find . -type d -name "*.terraform" -prune -exec rm -rf {} \;
install-pre-commit-hook:
@if [ -f .git/hooks/pre-commit -o -L .git/hooks/pre-commit ]; then \
echo ""; \
echo "There is already a pre-commit hook installed. Remove it and run 'make"; \
echo "install-pre-commit-hook again, or manually alter it to add the contents"; \
echo "of '.scripts/pre-commit'."; \
echo ""; \
exit 1; \
fi
@ln -s .scripts/pre-commit .git/hooks/pre-commit
@echo "pre-commit hook installed."