Fix drone

This commit is contained in:
Lunny Xiao 2021-04-09 21:49:48 +08:00
parent 1aab353c2d
commit b53291bb0e
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,9 @@ GOFMT ?= gofmt -s
TAGS ?= TAGS ?=
SED_INPLACE := sed -i SED_INPLACE := sed -i
GOFILES := $(shell find . -name "*.go" -type f) GO_DIRS := caches contexts integrations convert core dialects internal log migrate names schemas tags
GOFILES := $(wildcard *.go)
GOFILES += $(shell find $(GO_DIRS) -name "*.go" -type f)
INTEGRATION_PACKAGES := xorm.io/xorm/integrations INTEGRATION_PACKAGES := xorm.io/xorm/integrations
PACKAGES ?= $(filter-out $(INTEGRATION_PACKAGES),$(shell $(GO) list ./...)) PACKAGES ?= $(filter-out $(INTEGRATION_PACKAGES),$(shell $(GO) list ./...))
@ -70,6 +72,7 @@ fmt:
.PHONY: fmt-check .PHONY: fmt-check
fmt-check: fmt-check:
# get all go files and run go fmt on them # get all go files and run go fmt on them
echo $(GOFILES)
@diff=$$($(GOFMT) -d $(GOFILES)); \ @diff=$$($(GOFMT) -d $(GOFILES)); \
if [ -n "$$diff" ]; then \ if [ -n "$$diff" ]; then \
echo "Please run 'make fmt' and commit the result:"; \ echo "Please run 'make fmt' and commit the result:"; \