forked from gruntwork-io/terragrunt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (22 loc) · 912 Bytes
/
Makefile
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
26
27
28
# Some of the targets in this file were taken from the terraform project:
# https://github.com/hashicorp/terraform/blob/master/scripts/gofmtcheck.sh
GOFMT_FILES?=$$(find . -name '*.go' | grep -v vendor)
help:
@echo "Various utilities for managing the terragrunt repository"
fmtcheck:
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
fmt:
@echo "Running source files through gofmt..."
gofmt -w $(GOFMT_FILES)
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."
.PHONY: help fmtcheck fmt install-fmt-hook