-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (24 loc) · 913 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
29
30
.PHONY: init
init: init_tf init_pre_commit_reqs
init_tf: ## Ensure terraform and terragrunt is installed and activated correctly using .version files
brew install -q tgenv tgenv sops
tgenv install
tfenv install
tgenv list
tfenv list
init_pre_commit_reqs: ## Ensure pre-commit repo packages dependencies are available.
brew install -q commitizen pre-commit terraform-docs tflint tfsec checkov terrascan infracost tfupdate minamijoyo/hcledit/hcledit jq yq
npm install
.PHONY: ensure_pre_commit
ensure_pre_commit: ## Ensure pre-commit is installed
pre-commit install
pre-commit install-hooks
.PHONY: pre_commit_tests
pre_commit_tests: ensure_pre_commit ## Run pre-commit tests
pre-commit run --a
.PHONY: clean_pre_commit ## Clean pre-commit - Useful for troubleshooting dirty plugins
clean_pre_commit:
pre-commit clean
pre-commit gc
.PHONY: test ## Perform pre-commit tests
test: pre_commit_tests