1
1
DIST := dist
2
2
DIST_DIRS := $(DIST ) /binaries $(DIST ) /release
3
3
IMPORT := code.gitea.io/gitea
4
- export GO111MODULE =off
4
+ export GO111MODULE =on
5
5
6
6
GO ?= go
7
7
SED_INPLACE := sed -i
66
66
67
67
LDFLAGS := $(LDFLAGS ) -X "main.MakeVersion=$(MAKE_VERSION ) " -X "main.Version=$(GITEA_VERSION ) " -X "main.Tags=$(TAGS ) "
68
68
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/) ) )
70
70
71
71
WEBPACK_SOURCES := $(shell find web_src/js web_src/less -type f)
72
72
WEBPACK_CONFIGS := webpack.config.js
@@ -95,7 +95,7 @@ FOMANTIC_DEST := public/fomantic/semantic.min.js public/fomantic/semantic.min.cs
95
95
FOMANTIC_DEST_DIR := public/fomantic
96
96
97
97
# To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/[email protected]
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
99
99
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
100
100
SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl}}/api/v1"|g
101
101
SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl}}/api/v1"|"basePath": "/api/v1"|g
@@ -273,7 +273,7 @@ lint-frontend: node_modules
273
273
274
274
.PHONY : test
275
275
test :
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 )
277
277
278
278
.PHONY : test-check
279
279
test-check :
@@ -289,19 +289,19 @@ test-check:
289
289
290
290
.PHONY : test\# %
291
291
test\#% :
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 )
293
293
294
294
.PHONY : coverage
295
295
coverage :
296
296
GO111MODULE=on $(GO ) run -mod=vendor build/gocovmerge.go integration.coverage.out $(shell find . -type f -name "coverage.out") > coverage.all
297
297
298
298
.PHONY : unit-test-coverage
299
299
unit-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
301
301
302
302
.PHONY : vendor
303
303
vendor :
304
- GO111MODULE=on $(GO ) mod tidy && GO111MODULE=on $(GO ) mod vendor
304
+ $(GO ) mod tidy && $(GO ) mod vendor
305
305
306
306
.PHONY : test-vendor
307
307
test-vendor : vendor
@@ -422,22 +422,22 @@ integration-test-coverage: integrations.cover.test generate-ini-mysql
422
422
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
423
423
424
424
integrations.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
426
426
427
427
integrations.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
429
429
430
430
integrations.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
432
432
433
433
integrations.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
435
435
436
436
integrations.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'
438
438
439
439
integrations.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
441
441
442
442
.PHONY : migrations.mysql.test
443
443
migrations.mysql.test : $(GO_SOURCES )
@@ -477,10 +477,10 @@ backend: go-check generate $(EXECUTABLE)
477
477
478
478
.PHONY : generate
479
479
generate : $(TAGS_PREREQ )
480
- GO111MODULE=on $(GO ) generate -mod=vendor -tags ' $(TAGS)' $(GO_PACKAGES )
480
+ $(GO ) generate -mod=vendor -tags ' $(TAGS)' $(GO_PACKAGES )
481
481
482
482
$(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 $@
484
484
485
485
.PHONY : release
486
486
release : frontend generate release-windows release-linux release-darwin release-copy release-compress release-sources release-check
@@ -617,4 +617,4 @@ golangci-lint:
617
617
export BINARY=" golangci-lint" ; \
618
618
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH ) /bin v1.24.0; \
619
619
fi
620
- env GO111MODULE=on golangci-lint run --timeout 5m
620
+ golangci-lint run --timeout 5m
0 commit comments