File tree 3 files changed +25
-4
lines changed
3 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ ifneq (,)
2
2
.error This Makefile requires GNU Make.
3
3
endif
4
4
5
- .PHONY : build rebuild lint test _test-tf-version _test-fmt-ok _test-fmt-fail tag pull login push enter
5
+ .PHONY : build rebuild lint test _test-tf-version _test-fmt-ok _test-fmt-none _test-fmt- fail tag pull login push enter
6
6
7
7
CURRENT_DIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST ) ) ) )
8
8
28
28
test :
29
29
@$(MAKE ) --no-print-directory _test-tf-version
30
30
@$(MAKE ) --no-print-directory _test-fmt-ok
31
+ @$(MAKE ) --no-print-directory _test-fmt-none
31
32
@$(MAKE ) --no-print-directory _test-fmt-fail
32
33
33
34
_test-tf-version :
@@ -84,6 +85,24 @@ _test-fmt-ok:
84
85
fi ; \
85
86
echo " Success" ;
86
87
88
+ _test-fmt-none :
89
+ @echo " ------------------------------------------------------------"
90
+ @echo " - Testing terragrunt-fmt (NONE) [recursive]"
91
+ @echo " ------------------------------------------------------------"
92
+ @if ! docker run --rm -v $(CURRENT_DIR ) /data:/data $(IMAGE ) -write=false -list=true -check -diff -recursive; then \
93
+ echo " Failed" ; \
94
+ exit 1; \
95
+ fi ; \
96
+ echo " Success" ;
97
+ @echo " ------------------------------------------------------------"
98
+ @echo " - Testing terragrunt-fmt (NONE) [dir]"
99
+ @echo " ------------------------------------------------------------"
100
+ @if ! docker run --rm -v $(CURRENT_DIR ) /data:/data $(IMAGE ) -write=false -list=true -check -diff; then \
101
+ echo " Failed" ; \
102
+ exit 1; \
103
+ fi ; \
104
+ echo " Success" ;
105
+
87
106
_test-fmt-fail :
88
107
@echo " ------------------------------------------------------------"
89
108
@echo " - Testing terragrunt-fmt (FAIL) [recursive]"
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ fix: _pull
181
181
-write -diff -recursive -ignore=' $(IGNORE)'
182
182
183
183
_pull :
184
- docker pull cytopia/terraform -fmt:$(FMT_VERSION )
184
+ docker pull cytopia/terragrunt -fmt:$(FMT_VERSION )
185
185
```
186
186
187
187
# ### Travis CI integration
Original file line number Diff line number Diff line change @@ -283,8 +283,10 @@ else
283
283
echo " [INFO] Finding files: for file in *.hcl; do"
284
284
ret=0
285
285
for file in * .hcl; do
286
- if ! /fmt.sh " ${ARG_LIST} " " ${ARG_WRITE} " " ${ARG_DIFF} " " ${ARG_CHECK} " " ${file} " ; then
287
- ret=" 1"
286
+ if [ -f " ${file} " ]; then
287
+ if ! /fmt.sh " ${ARG_LIST} " " ${ARG_WRITE} " " ${ARG_DIFF} " " ${ARG_CHECK} " " ${file} " ; then
288
+ ret=" 1"
289
+ fi
288
290
fi
289
291
done
290
292
exit " ${ret} "
You can’t perform that action at this time.
0 commit comments