File tree 1 file changed +12
-17
lines changed
1 file changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -27,23 +27,18 @@ list:
27
27
@grep ' ^[^#[:space:]].*:' Makefile
28
28
.PHONY : list
29
29
30
- fmt :
31
- set -e; \
32
- FILES=" $$ (find . -type f -name " * .bicep* " ! -name " * .tmpl.bicepparam" )" ; \
33
- for file in $$ FILES; do \
34
- echo " az bicep format --file $$ {file}" ; \
35
- az bicep format --file $$ file; \
36
- done
37
- .PHONY : fmt
38
-
39
- lint :
40
- set -e; \
41
- FILES=" $$ (find . -type f -name " * .bicep* " ! -name " * .tmpl.bicepparam" )" ; \
42
- for file in $$ FILES; do \
43
- echo " az bicep lint --file $$ {file}" ; \
44
- az bicep lint --file $$ file; \
45
- done
46
- .PHONY : lint
30
+ modules := $(wildcard ./templates/* .bicep)
31
+ parameters := $(filter-out $(wildcard ./templates/* .tmpl.bicepparam) ,$(wildcard ./templates/* .bicepparam) )
32
+
33
+ fmt : $(modules:.bicep=.bicep.fmt ) $(parameters:.bicepparam=.biceparam.fmt )
34
+
35
+ lint : $(modules:.bicep=.bicep.lint ) $(parameters:.bicepparam=.biceparam.lint )
36
+
37
+ % .bicep.fmt % .bicepparam.fmt :
38
+ az bicep format --file $(basename $@ )
39
+
40
+ % .bicep.lint % .bicepparam.lint :
41
+ az bicep lint --file $(basename $@ )
47
42
48
43
feature-registration : # hardcoded to eastus as this is a subscription deployment, not a resource group
49
44
@az deployment sub create \
You can’t perform that action at this time.
0 commit comments