11DIST := dist
22DIST_DIRS := $(DIST ) /binaries $(DIST ) /release
33IMPORT := code.gitea.io/gitea
4- export GO111MODULE =off
4+ export GO111MODULE =on
55
66GO ?= go
77SED_INPLACE := sed -i
6666
6767LDFLAGS := $(LDFLAGS ) -X "main.MakeVersion=$(MAKE_VERSION ) " -X "main.Version=$(GITEA_VERSION ) " -X "main.Tags=$(TAGS ) "
6868
69- GO_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/) ) )
69+ GO_PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell $(GO ) list -mod=vendor ./... | grep -v /vendor/) ) )
7070
7171WEBPACK_SOURCES := $(shell find web_src/js web_src/less -type f)
7272WEBPACK_CONFIGS := webpack.config.js
@@ -95,7 +95,7 @@ FOMANTIC_DEST := public/fomantic/semantic.min.js public/fomantic/semantic.min.cs
9595FOMANTIC_DEST_DIR := public/fomantic
9696
9797# To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/swagger@v0.20.1
98- SWAGGER := GO111MODULE=on $(GO ) run -mod=vendor github.com/go-swagger/go-swagger/cmd/swagger
98+ SWAGGER := $(GO ) run -mod=vendor github.com/go-swagger/go-swagger/cmd/swagger
9999SWAGGER_SPEC := templates/swagger/v1_json.tmpl
100100SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl}}/api/v1"|g
101101SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl}}/api/v1"|"basePath": "/api/v1"|g
@@ -273,7 +273,7 @@ lint-frontend: node_modules
273273
274274.PHONY : test
275275test :
276- GO111MODULE=on $(GO ) test $(GOTESTFLAGS ) -mod=vendor -tags=' sqlite sqlite_unlock_notify' $(GO_PACKAGES )
276+ $(GO ) test $(GOTESTFLAGS ) -mod=vendor -tags=' sqlite sqlite_unlock_notify' $(GO_PACKAGES )
277277
278278.PHONY : test-check
279279test-check :
@@ -289,19 +289,19 @@ test-check:
289289
290290.PHONY : test\# %
291291test\#% :
292- GO111MODULE=on $(GO ) test -mod=vendor -tags=' sqlite sqlite_unlock_notify' -run $* $(GO_PACKAGES )
292+ $(GO ) test -mod=vendor -tags=' sqlite sqlite_unlock_notify' -run $* $(GO_PACKAGES )
293293
294294.PHONY : coverage
295295coverage :
296296 GO111MODULE=on $(GO ) run -mod=vendor build/gocovmerge.go integration.coverage.out $(shell find . -type f -name "coverage.out") > coverage.all
297297
298298.PHONY : unit-test-coverage
299299unit-test-coverage :
300- GO111MODULE=on $(GO ) test $(GOTESTFLAGS ) -mod=vendor -tags=' sqlite sqlite_unlock_notify' -cover -coverprofile coverage.out $(GO_PACKAGES ) && echo " \n==>\033[32m Ok\033[m\n" || exit 1
300+ $(GO ) test $(GOTESTFLAGS ) -mod=vendor -tags=' sqlite sqlite_unlock_notify' -cover -coverprofile coverage.out $(GO_PACKAGES ) && echo " \n==>\033[32m Ok\033[m\n" || exit 1
301301
302302.PHONY : vendor
303303vendor :
304- GO111MODULE=on $(GO ) mod tidy && GO111MODULE=on $(GO ) mod vendor
304+ $(GO ) mod tidy && $(GO ) mod vendor
305305
306306.PHONY : test-vendor
307307test-vendor : vendor
@@ -422,22 +422,22 @@ integration-test-coverage: integrations.cover.test generate-ini-mysql
422422 GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
423423
424424integrations.mysql.test : git-check $(GO_SOURCES )
425- GO111MODULE=on $(GO ) test $(GOTESTFLAGS ) -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mysql.test
425+ $(GO ) test $(GOTESTFLAGS ) -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mysql.test
426426
427427integrations.mysql8.test : git-check $(GO_SOURCES )
428- GO111MODULE=on $(GO ) test $(GOTESTFLAGS ) -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mysql8.test
428+ $(GO ) test $(GOTESTFLAGS ) -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mysql8.test
429429
430430integrations.pgsql.test : git-check $(GO_SOURCES )
431- GO111MODULE=on $(GO ) test $(GOTESTFLAGS ) -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.pgsql.test
431+ $(GO ) test $(GOTESTFLAGS ) -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.pgsql.test
432432
433433integrations.mssql.test : git-check $(GO_SOURCES )
434- GO111MODULE=on $(GO ) test $(GOTESTFLAGS ) -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mssql.test
434+ $(GO ) test $(GOTESTFLAGS ) -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mssql.test
435435
436436integrations.sqlite.test : git-check $(GO_SOURCES )
437- GO111MODULE=on $(GO ) test $(GOTESTFLAGS ) -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags ' sqlite sqlite_unlock_notify'
437+ $(GO ) test $(GOTESTFLAGS ) -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags ' sqlite sqlite_unlock_notify'
438438
439439integrations.cover.test : git-check $(GO_SOURCES )
440- GO111MODULE=on $(GO ) test $(GOTESTFLAGS ) -mod=vendor -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(GO_PACKAGES ) | tr ' ' ',') -o integrations.cover.test
440+ $(GO ) test $(GOTESTFLAGS ) -mod=vendor -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(GO_PACKAGES ) | tr ' ' ',') -o integrations.cover.test
441441
442442.PHONY : migrations.mysql.test
443443migrations.mysql.test : $(GO_SOURCES )
@@ -477,10 +477,10 @@ backend: go-check generate $(EXECUTABLE)
477477
478478.PHONY : generate
479479generate : $(TAGS_PREREQ )
480- GO111MODULE=on $(GO ) generate -mod=vendor -tags ' $(TAGS)' $(GO_PACKAGES )
480+ $(GO ) generate -mod=vendor -tags ' $(TAGS)' $(GO_PACKAGES )
481481
482482$(EXECUTABLE ) : $(GO_SOURCES ) $(TAGS_PREREQ )
483- GO111MODULE=on $(GO ) build -mod=vendor $(GOFLAGS ) $(EXTRA_GOFLAGS ) -tags ' $(TAGS)' -ldflags ' -s -w $(LDFLAGS)' -o $@
483+ $(GO ) build -mod=vendor $(GOFLAGS ) $(EXTRA_GOFLAGS ) -tags ' $(TAGS)' -ldflags ' -s -w $(LDFLAGS)' -o $@
484484
485485.PHONY : release
486486release : frontend generate release-windows release-linux release-darwin release-copy release-compress release-sources release-check
@@ -617,4 +617,4 @@ golangci-lint:
617617 export BINARY=" golangci-lint" ; \
618618 curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH ) /bin v1.24.0; \
619619 fi
620- env GO111MODULE=on golangci-lint run --timeout 5m
620+ golangci-lint run --timeout 5m
0 commit comments