File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ Pre-commit configuration is **centralized** in `makeitworkcloud/images/tfroot-ru
1616
1717For local development, run:
1818``` bash
19- curl -sSL -o .pre-commit-config.yaml \
20- https://raw.githubusercontent.com/makeitworkcloud/images/main/tfroot-runner/pre-commit-config.yaml
2119make test
2220```
2321
22+ This automatically fetches the canonical config if not present.
23+
2424## Related Repositories
2525
2626- ` images ` - Contains tfroot-runner image and canonical pre-commit config
Original file line number Diff line number Diff line change 1919 @echo " -----------------"
2020 @echo
2121 @echo " \tinit: run 'terraform init'"
22- @echo " \ttest: run pre-commmit checks"
22+ @echo " \ttest: fetch canonical pre-commit config and run checks"
2323 @echo " \tplan: run 'terraform plan'"
2424 @echo " \tapply: run 'terraform apply'"
2525 @echo " \tmigrate; run terraform init -migrate-state"
@@ -55,9 +55,13 @@ migrate:
5555 @echo " First use -make init- using the old S3 backend, then run -make migrate- to use the new one."
5656 @${TERRAFORM} init -migrate-state -backend-config=" key=${S3_KEY} " -backend-config=" bucket=${S3_BUCKET} " -backend-config=" region=${S3_REGION} " -backend-config=" access_key=${S3_ACCESS_KEY} " -backend-config=" secret_key=${S3_SECRET_KEY} "
5757
58- test : .git/hooks/pre-commit
58+ test : .pre-commit-config.yaml . git/hooks/pre-commit
5959 @pre-commit run -a
6060
61+ .pre-commit-config.yaml :
62+ @curl -sSL -o .pre-commit-config.yaml \
63+ https://raw.githubusercontent.com/makeitworkcloud/images/main/tfroot-runner/pre-commit-config.yaml
64+
6165DEPS_PRE_COMMIT =$(shell which pre-commit || echo "pre-commit not found")
6266DEPS_TERRAFORM_DOCS =$(shell which terraform-docs || echo "terraform-docs not found")
6367DEPS_TFLINT =$(shell which tflint || echo "tflint not found,")
You can’t perform that action at this time.
0 commit comments