-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (30 loc) · 1021 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
31
32
33
34
35
36
37
38
39
40
DIR_GIT=$(shell sh -c "git rev-parse --show-toplevel")
all: help
##@ Docs Generation
doc: README.md ## Generates Terraform docs for modules
$(call info_colors,blue,📄 Terraform docs)
@terraform-docs .
##@ Checks
precommit: ## Runs precommit on all files
$(call info_colors,green,👍 Pre-commit checks)
@pre-commit run --all-files && echo "Pre-commit checks passed" || echo "Pre-commit checks failed"
##@ Formating
format: ## Runs Terraform fmt and Validate
terraform fmt
terraform validate
##@ Commit
commit: ## Commits all files
$(call info_colors,purple,🛍 Commits Changed files)
@echo "Modified files:"
@git status -s
@cz
cz: doc precommit commit ## Runs Docs, precommit and commits
##@ Version
dry-run: ## Dry run the version
$(call info_colors,green,👏 Generate Version Dry Run)
@npm run dry-run
version: ## Generate the version
$(call info_colors,green,👏 Generate Version)
@npm run version
include $(DIR_GIT)/prettier.mk
.PHONY: all doc format precommit commit cz dry-run version