27
27
endif
28
28
endif
29
29
30
- GOFILES := $(shell find . -name "* .go" -type f ! -path "./vendor/* " ! -path "* /bindata.go")
31
30
GOFMT ?= gofmt -s
32
31
33
32
GOFLAGS := -v
@@ -64,7 +63,9 @@ LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(G
64
63
65
64
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell GO111MODULE=on $(GO ) list -mod=vendor ./... | grep -v /vendor/) ) )
66
65
67
- GO_SOURCES ?= $(shell find . -name "* .go" -type f)
66
+ GO_SOURCES ?= $(shell find . -type d \( -path ./node_modules -o -path ./docs -o -path ./public -o -path ./options -o -path ./contrib -o -path ./data \) -prune -o -type f -name '*.go' -print)
67
+ GO_SOURCES_OWN := $(filter-out ./vendor/% % /bindata.go, $(GO_SOURCES ) )
68
+
68
69
WEBPACK_SOURCES ?= $(shell find web_src/js web_src/less -type f)
69
70
WEBPACK_CONFIGS := webpack.config.js .eslintrc .stylelintrc
70
71
@@ -74,15 +75,13 @@ BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST))
74
75
75
76
WEBPACK_DEST_DIRS := public/js public/css
76
77
77
- FOMANTIC_SOURCES ?= $( shell find web_src/fomantic -type f)
78
+ FOMANTIC_SOURCES ?= web_src/fomantic/theme.config.less web_src/fomantic/_site/globals/site.variables
78
79
FOMANTIC_DEST_DIR := public/fomantic
79
80
FOMANTIC_EVIDENCE := $(MAKE_EVIDENCE_DIR ) /fomantic
80
81
81
82
TAGS ?=
82
83
TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR ) /tags
83
84
84
- TMPDIR := $(shell mktemp -d 2>/dev/null || mktemp -d -t 'gitea-temp')
85
-
86
85
# To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/[email protected]
87
86
SWAGGER := GO111MODULE=on $(GO ) run -mod=vendor github.com/go-swagger/go-swagger/cmd/swagger
88
87
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
@@ -174,7 +173,7 @@ clean:
174
173
175
174
.PHONY : fmt
176
175
fmt :
177
- $(GOFMT ) -w $(GOFILES )
176
+ $(GOFMT ) -w $(GO_SOURCES_OWN )
178
177
179
178
.PHONY : vet
180
179
vet :
@@ -229,19 +228,19 @@ misspell-check:
229
228
@hash misspell > /dev/null 2>&1 ; if [ $$ ? -ne 0 ]; then \
230
229
$(GO ) get -u github.com/client9/misspell/cmd/misspell; \
231
230
fi
232
- misspell -error -i unknwon,destory $(GOFILES )
231
+ misspell -error -i unknwon,destory $(GO_SOURCES_OWN )
233
232
234
233
.PHONY : misspell
235
234
misspell :
236
235
@hash misspell > /dev/null 2>&1 ; if [ $$ ? -ne 0 ]; then \
237
236
$(GO ) get -u github.com/client9/misspell/cmd/misspell; \
238
237
fi
239
- misspell -w -i unknwon $(GOFILES )
238
+ misspell -w -i unknwon $(GO_SOURCES_OWN )
240
239
241
240
.PHONY : fmt-check
242
241
fmt-check :
243
242
# get all go files and run go fmt on them
244
- @diff=$$($(GOFMT ) -d $(GOFILES ) ) ; \
243
+ @diff=$$($(GOFMT ) -d $(GO_SOURCES_OWN ) ) ; \
245
244
if [ -n " $$ diff" ]; then \
246
245
echo " Please run 'make fmt' and commit the result:" ; \
247
246
echo " $$ {diff}" ; \
@@ -569,6 +568,7 @@ update-translations:
569
568
570
569
.PHONY : generate-images
571
570
generate-images :
571
+ $(eval TMPDIR := $(shell mktemp -d 2>/dev/null || mktemp -d -t 'gitea-temp') )
572
572
mkdir -p $(TMPDIR ) /images
573
573
inkscape -f $(PWD ) /assets/logo.svg -w 880 -h 880 -e $(PWD ) /public/img/gitea-lg.png
574
574
inkscape -f $(PWD ) /assets/logo.svg -w 512 -h 512 -e $(PWD ) /public/img/gitea-512.png
0 commit comments