@@ -92,7 +92,7 @@ LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(G
92
92
93
93
LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64
94
94
95
- GO_PACKAGES ?= $(filter-out code.gitea.io/gitea/models/migrations code.gitea.io/gitea/integrations/migration-test code.gitea.io/gitea/integrations,$(shell $(GO ) list -mod=vendor ./... | grep -v /vendor/) )
95
+ GO_PACKAGES ?= $(filter-out code.gitea.io/gitea/models/migrations code.gitea.io/gitea/integrations/migration-test code.gitea.io/gitea/integrations,$(shell $(GO ) list ./... | grep -v /vendor/) )
96
96
97
97
FOMANTIC_WORK_DIR := web_src/fomantic
98
98
@@ -116,7 +116,7 @@ TEST_TAGS ?= sqlite sqlite_unlock_notify
116
116
117
117
TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE ) $(FOMANTIC_WORK_DIR ) /node_modules $(DIST ) $(MAKE_EVIDENCE_DIR ) $(AIR_TMP_DIR )
118
118
119
- GO_DIRS := cmd integrations models modules routers build services vendor tools
119
+ GO_DIRS := cmd integrations models modules routers build services tools
120
120
121
121
GO_SOURCES := $(wildcard * .go)
122
122
GO_SOURCES += $(shell find $(GO_DIRS ) -type f -name "* .go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go)
@@ -126,7 +126,7 @@ ifeq ($(filter $(TAGS_SPLIT),bindata),bindata)
126
126
endif
127
127
128
128
# To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/swagger
129
- SWAGGER := $(GO ) run -mod=vendor github.com/go-swagger/go-swagger/cmd/swagger
129
+ SWAGGER := $(GO ) run github.com/go-swagger/go-swagger/cmd/swagger
130
130
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
131
131
SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl \| JSEscape \| Safe}}/api/v1"|g
132
132
SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl \| JSEscape \| Safe}}/api/v1"|"basePath": "/api/v1"|g
237
237
.PHONY : vet
238
238
vet :
239
239
@echo " Running go vet..."
240
- @GOOS= GOARCH= $(GO ) build -mod=vendor code.gitea.io/gitea-vet
240
+ @GOOS= GOARCH= $(GO ) build code.gitea.io/gitea-vet
241
241
@$(GO ) vet -vettool=gitea-vet $(GO_PACKAGES )
242
242
243
243
.PHONY : $(TAGS_EVIDENCE )
@@ -295,7 +295,7 @@ checks: checks-frontend checks-backend
295
295
checks-frontend : svg-check
296
296
297
297
.PHONY : checks-backend
298
- checks-backend : test-vendor swagger-check swagger-validate
298
+ checks-backend : swagger-check swagger-validate
299
299
300
300
.PHONY : lint
301
301
lint : lint-frontend lint-backend
@@ -331,7 +331,7 @@ test: test-frontend test-backend
331
331
.PHONY : test-backend
332
332
test-backend :
333
333
@echo " Running go test with $( GOTESTFLAGS) -tags '$( TEST_TAGS) '..."
334
- @$(GO ) test $(GOTESTFLAGS ) -mod=vendor - tags=' $(TEST_TAGS)' $(GO_PACKAGES )
334
+ @$(GO ) test $(GOTESTFLAGS ) -tags=' $(TEST_TAGS)' $(GO_PACKAGES )
335
335
336
336
.PHONY : test-frontend
337
337
test-frontend : node_modules
@@ -352,18 +352,18 @@ test-check:
352
352
.PHONY : test\# %
353
353
test\#% :
354
354
@echo " Running go test with -tags '$( TEST_TAGS) '..."
355
- @$(GO ) test -mod=vendor $(GOTESTFLAGS ) -tags=' $(TEST_TAGS)' -run $(subst .,/,$* ) $(GO_PACKAGES )
355
+ @$(GO ) test $(GOTESTFLAGS ) -tags=' $(TEST_TAGS)' -run $(subst .,/,$* ) $(GO_PACKAGES )
356
356
357
357
.PHONY : coverage
358
358
coverage :
359
359
grep ' ^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' coverage.out > coverage-bodged.out
360
360
grep ' ^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' integration.coverage.out > integration.coverage-bodged.out
361
- GO111MODULE=on $(GO ) run -mod=vendor build/gocovmerge.go integration.coverage-bodged.out coverage-bodged.out > coverage.all || (echo " gocovmerge failed" ; echo " integration.coverage.out" ; cat integration.coverage.out; echo " coverage.out" ; cat coverage.out; exit 1)
361
+ GO111MODULE=on $(GO ) run build/gocovmerge.go integration.coverage-bodged.out coverage-bodged.out > coverage.all || (echo " gocovmerge failed" ; echo " integration.coverage.out" ; cat integration.coverage.out; echo " coverage.out" ; cat coverage.out; exit 1)
362
362
363
363
.PHONY : unit-test-coverage
364
364
unit-test-coverage :
365
365
@echo " Running unit-test-coverage $( GOTESTFLAGS) -tags '$( TEST_TAGS) '..."
366
- @$(GO ) test $(GOTESTFLAGS ) -mod=vendor - timeout=20m -tags=' $(TEST_TAGS)' -cover -coverprofile coverage.out $(GO_PACKAGES ) && echo " \n==>\033[32m Ok\033[m\n" || exit 1
366
+ @$(GO ) test $(GOTESTFLAGS ) -timeout=20m -tags=' $(TEST_TAGS)' -cover -coverprofile coverage.out $(GO_PACKAGES ) && echo " \n==>\033[32m Ok\033[m\n" || exit 1
367
367
368
368
.PHONY : vendor
369
369
vendor :
@@ -501,22 +501,22 @@ integration-test-coverage: integrations.cover.test generate-ini-mysql
501
501
GITEA_ROOT=" $( CURDIR) " GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
502
502
503
503
integrations.mysql.test : git-check $(GO_SOURCES )
504
- $(GO ) test $(GOTESTFLAGS ) -mod=vendor - c code.gitea.io/gitea/integrations -o integrations.mysql.test
504
+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/integrations -o integrations.mysql.test
505
505
506
506
integrations.mysql8.test : git-check $(GO_SOURCES )
507
- $(GO ) test $(GOTESTFLAGS ) -mod=vendor - c code.gitea.io/gitea/integrations -o integrations.mysql8.test
507
+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/integrations -o integrations.mysql8.test
508
508
509
509
integrations.pgsql.test : git-check $(GO_SOURCES )
510
- $(GO ) test $(GOTESTFLAGS ) -mod=vendor - c code.gitea.io/gitea/integrations -o integrations.pgsql.test
510
+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/integrations -o integrations.pgsql.test
511
511
512
512
integrations.mssql.test : git-check $(GO_SOURCES )
513
- $(GO ) test $(GOTESTFLAGS ) -mod=vendor - c code.gitea.io/gitea/integrations -o integrations.mssql.test
513
+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/integrations -o integrations.mssql.test
514
514
515
515
integrations.sqlite.test : git-check $(GO_SOURCES )
516
- $(GO ) test $(GOTESTFLAGS ) -mod=vendor - c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags ' $(TEST_TAGS)'
516
+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags ' $(TEST_TAGS)'
517
517
518
518
integrations.cover.test : git-check $(GO_SOURCES )
519
- $(GO ) test $(GOTESTFLAGS ) -mod=vendor - c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(GO_PACKAGES ) | tr ' ' ',') -o integrations.cover.test
519
+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(GO_PACKAGES ) | tr ' ' ',') -o integrations.cover.test
520
520
521
521
.PHONY : migrations.mysql.test
522
522
migrations.mysql.test : $(GO_SOURCES )
@@ -577,13 +577,13 @@ backend: go-check generate $(EXECUTABLE)
577
577
.PHONY : generate
578
578
generate : $(TAGS_PREREQ )
579
579
@echo " Running go generate..."
580
- @CC= GOOS= GOARCH= $(GO ) generate -mod=vendor - tags ' $(TAGS)' $(GO_PACKAGES )
580
+ @CC= GOOS= GOARCH= $(GO ) generate -tags ' $(TAGS)' $(GO_PACKAGES )
581
581
582
582
$(EXECUTABLE ) : $(GO_SOURCES ) $(TAGS_PREREQ )
583
- CGO_CFLAGS=" $( CGO_CFLAGS) " $(GO ) build -mod=vendor $(GOFLAGS ) $(EXTRA_GOFLAGS ) -tags ' $(TAGS)' -ldflags ' -s -w $(LDFLAGS)' -o $@
583
+ CGO_CFLAGS=" $( CGO_CFLAGS) " $(GO ) build $(GOFLAGS ) $(EXTRA_GOFLAGS ) -tags ' $(TAGS)' -ldflags ' -s -w $(LDFLAGS)' -o $@
584
584
585
585
.PHONY : release
586
- release : frontend generate release-windows release-linux release-darwin release-copy release-compress release-sources release-docs release-check
586
+ release : frontend generate release-windows release-linux release-darwin release-copy release-compress vendor release-sources release-docs release-check
587
587
588
588
$(DIST_DIRS ) :
589
589
mkdir -p $(DIST_DIRS )
0 commit comments