aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorsilverwind2022-08-31 17:58:54 +0200
committerGitHub2022-08-31 23:58:54 +0800
commit647b2649b1600107c5fec3505db691f78b2c1e2a (patch)
treeb3bcaf968426f6ad1ba4fde3e41f3ca3224ec47e /Makefile
parentc80ca94ab1de8ea3b13c1087cd7140165a11ceb7 (diff)
Make sure fmt catches all templates (#20979)
* Make sure fmt catches all templates Make's `wildcard` is not recursive so it missed many template files, fix that by using `find`. * Update Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0b2dce53e..9e0c29f2b 100644
--- a/Makefile
+++ b/Makefile
@@ -243,7 +243,7 @@ clean:
.PHONY: fmt
fmt:
@MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -w '{file-list}'
- $(eval TEMPLATES := $(wildcard templates/**/*.tmpl))
+ $(eval TEMPLATES := $(shell find templates -type f -name '*.tmpl'))
@# strip whitespace after '{{' and before `}}` unless there is only whitespace before it
@$(SED_INPLACE) -e 's/{{[ ]\{1,\}/{{/g' -e '/^[ ]\{1,\}}}/! s/[ ]\{1,\}}}/}}/g' $(TEMPLATES)