Skip to content

Commit 84145e4

Browse files
Remove golang vendored directory (#18277)
* rm go vendor * fix drone yaml * add to gitignore
1 parent 2b16ca7 commit 84145e4

File tree

6,586 files changed

+46
-2584499
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,586 files changed

+46
-2584499
lines changed

.drone.yml

+24-24
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,16 @@ steps:
8888
image: golang:1.16 # this step is kept as the lowest version of golang that we support
8989
environment:
9090
GO111MODULE: on
91-
GOPROXY: off
91+
GOPROXY: https://goproxy.cn
9292
commands:
93-
- go build -mod=vendor -o gitea_no_gcc # test if build succeeds without the sqlite tag
93+
- go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
9494
depends_on: [checks-backend]
9595

9696
- name: build-backend-arm64
9797
image: golang:1.17
9898
environment:
9999
GO111MODULE: on
100-
GOPROXY: off
100+
GOPROXY: https://goproxy.cn
101101
GOOS: linux
102102
GOARCH: arm64
103103
TAGS: bindata gogit
@@ -110,23 +110,23 @@ steps:
110110
image: golang:1.17
111111
environment:
112112
GO111MODULE: on
113-
GOPROXY: off
113+
GOPROXY: https://goproxy.cn
114114
GOOS: windows
115115
GOARCH: amd64
116116
TAGS: bindata gogit
117117
commands:
118-
- go build -mod=vendor -o gitea_windows
118+
- go build -o gitea_windows
119119
depends_on: [checks-backend]
120120

121121
- name: build-backend-386
122122
image: golang:1.17
123123
environment:
124124
GO111MODULE: on
125-
GOPROXY: off
125+
GOPROXY: https://goproxy.cn
126126
GOOS: linux
127127
GOARCH: 386
128128
commands:
129-
- go build -mod=vendor -o gitea_linux_386 # test if compatible with 32 bit
129+
- go build -o gitea_linux_386 # test if compatible with 32 bit
130130
depends_on: [checks-backend]
131131

132132
---
@@ -224,7 +224,7 @@ steps:
224224
commands:
225225
- make unit-test-coverage test-check
226226
environment:
227-
GOPROXY: off
227+
GOPROXY: https://goproxy.cn
228228
TAGS: bindata sqlite sqlite_unlock_notify
229229
RACE_ENABLED: true
230230
GITHUB_READ_TOKEN:
@@ -237,7 +237,7 @@ steps:
237237
commands:
238238
- make unit-test-coverage test-check
239239
environment:
240-
GOPROXY: off
240+
GOPROXY: https://goproxy.cn
241241
TAGS: bindata gogit sqlite sqlite_unlock_notify
242242
RACE_ENABLED: true
243243
GITHUB_READ_TOKEN:
@@ -249,7 +249,7 @@ steps:
249249
commands:
250250
- make test-mysql-migration integration-test-coverage
251251
environment:
252-
GOPROXY: off
252+
GOPROXY: https://goproxy.cn
253253
TAGS: bindata
254254
RACE_ENABLED: true
255255
TEST_LDAP: 1
@@ -264,7 +264,7 @@ steps:
264264
commands:
265265
- timeout -s ABRT 40m make test-mysql8-migration test-mysql8
266266
environment:
267-
GOPROXY: off
267+
GOPROXY: https://goproxy.cn
268268
TAGS: bindata
269269
RACE_ENABLED: true
270270
TEST_LDAP: 1
@@ -278,7 +278,7 @@ steps:
278278
commands:
279279
- make test-mssql-migration test-mssql
280280
environment:
281-
GOPROXY: off
281+
GOPROXY: https://goproxy.cn
282282
TAGS: bindata
283283
RACE_ENABLED: true
284284
TEST_LDAP: 1
@@ -291,7 +291,7 @@ steps:
291291
commands:
292292
- make coverage
293293
environment:
294-
GOPROXY: off
294+
GOPROXY: https://goproxy.cn
295295
TAGS: bindata
296296
depends_on:
297297
- unit-test
@@ -384,7 +384,7 @@ steps:
384384
commands:
385385
- timeout -s ABRT 40m make test-sqlite-migration test-sqlite
386386
environment:
387-
GOPROXY: off
387+
GOPROXY: https://goproxy.cn
388388
TAGS: bindata gogit sqlite sqlite_unlock_notify
389389
RACE_ENABLED: true
390390
TEST_TAGS: gogit sqlite sqlite_unlock_notify
@@ -398,7 +398,7 @@ steps:
398398
commands:
399399
- timeout -s ABRT 40m make test-pgsql-migration test-pgsql
400400
environment:
401-
GOPROXY: off
401+
GOPROXY: https://goproxy.cn
402402
TAGS: bindata gogit
403403
RACE_ENABLED: true
404404
TEST_TAGS: gogit
@@ -760,7 +760,7 @@ steps:
760760
auto_tag_suffix: linux-amd64
761761
repo: gitea/gitea
762762
build_args:
763-
- GOPROXY=off
763+
- GOPROXY=https://goproxy.cn
764764
password:
765765
from_secret: docker_password
766766
username:
@@ -778,7 +778,7 @@ steps:
778778
auto_tag_suffix: linux-amd64-rootless
779779
repo: gitea/gitea
780780
build_args:
781-
- GOPROXY=off
781+
- GOPROXY=https://goproxy.cn
782782
password:
783783
from_secret: docker_password
784784
username:
@@ -822,7 +822,7 @@ steps:
822822
tags: dev-linux-amd64
823823
repo: gitea/gitea
824824
build_args:
825-
- GOPROXY=off
825+
- GOPROXY=https://goproxy.cn
826826
password:
827827
from_secret: docker_password
828828
username:
@@ -840,7 +840,7 @@ steps:
840840
tags: dev-linux-amd64-rootless
841841
repo: gitea/gitea
842842
build_args:
843-
- GOPROXY=off
843+
- GOPROXY=https://goproxy.cn
844844
password:
845845
from_secret: docker_password
846846
username:
@@ -875,7 +875,7 @@ steps:
875875
repo: gitea/gitea
876876
tags: linux-arm64
877877
build_args:
878-
- GOPROXY=off
878+
- GOPROXY=https://goproxy.cn
879879
environment:
880880
PLUGIN_MIRROR:
881881
from_secret: plugin_mirror
@@ -917,7 +917,7 @@ steps:
917917
auto_tag_suffix: linux-arm64
918918
repo: gitea/gitea
919919
build_args:
920-
- GOPROXY=off
920+
- GOPROXY=https://goproxy.cn
921921
password:
922922
from_secret: docker_password
923923
username:
@@ -935,7 +935,7 @@ steps:
935935
auto_tag_suffix: linux-arm64-rootless
936936
repo: gitea/gitea
937937
build_args:
938-
- GOPROXY=off
938+
- GOPROXY=https://goproxy.cn
939939
password:
940940
from_secret: docker_password
941941
username:
@@ -979,7 +979,7 @@ steps:
979979
tags: dev-linux-arm64
980980
repo: gitea/gitea
981981
build_args:
982-
- GOPROXY=off
982+
- GOPROXY=https://goproxy.cn
983983
password:
984984
from_secret: docker_password
985985
username:
@@ -997,7 +997,7 @@ steps:
997997
tags: dev-linux-arm64-rootless
998998
repo: gitea/gitea
999999
build_args:
1000-
- GOPROXY=off
1000+
- GOPROXY=https://goproxy.cn
10011001
password:
10021002
from_secret: docker_password
10031003
username:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ cpu.out
8585
/public/css
8686
/public/fonts
8787
/public/img/webpack
88+
/vendor
8889
/web_src/fomantic/node_modules
8990
/web_src/fomantic/build/*
9091
!/web_src/fomantic/build/semantic.js

Makefile

+18-18
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(G
9292

9393
LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64
9494

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/))
9696

9797
FOMANTIC_WORK_DIR := web_src/fomantic
9898

@@ -116,7 +116,7 @@ TEST_TAGS ?= sqlite sqlite_unlock_notify
116116

117117
TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR)
118118

119-
GO_DIRS := cmd integrations models modules routers build services vendor tools
119+
GO_DIRS := cmd integrations models modules routers build services tools
120120

121121
GO_SOURCES := $(wildcard *.go)
122122
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)
126126
endif
127127

128128
#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
130130
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
131131
SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl \| JSEscape \| Safe}}/api/v1"|g
132132
SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl \| JSEscape \| Safe}}/api/v1"|"basePath": "/api/v1"|g
@@ -237,7 +237,7 @@ fmt:
237237
.PHONY: vet
238238
vet:
239239
@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
241241
@$(GO) vet -vettool=gitea-vet $(GO_PACKAGES)
242242

243243
.PHONY: $(TAGS_EVIDENCE)
@@ -295,7 +295,7 @@ checks: checks-frontend checks-backend
295295
checks-frontend: svg-check
296296

297297
.PHONY: checks-backend
298-
checks-backend: test-vendor swagger-check swagger-validate
298+
checks-backend: swagger-check swagger-validate
299299

300300
.PHONY: lint
301301
lint: lint-frontend lint-backend
@@ -331,7 +331,7 @@ test: test-frontend test-backend
331331
.PHONY: test-backend
332332
test-backend:
333333
@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)
335335

336336
.PHONY: test-frontend
337337
test-frontend: node_modules
@@ -352,18 +352,18 @@ test-check:
352352
.PHONY: test\#%
353353
test\#%:
354354
@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)
356356

357357
.PHONY: coverage
358358
coverage:
359359
grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' coverage.out > coverage-bodged.out
360360
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)
362362

363363
.PHONY: unit-test-coverage
364364
unit-test-coverage:
365365
@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
367367

368368
.PHONY: vendor
369369
vendor:
@@ -501,22 +501,22 @@ integration-test-coverage: integrations.cover.test generate-ini-mysql
501501
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
502502

503503
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
505505

506506
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
508508

509509
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
511511

512512
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
514514

515515
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)'
517517

518518
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
520520

521521
.PHONY: migrations.mysql.test
522522
migrations.mysql.test: $(GO_SOURCES)
@@ -577,13 +577,13 @@ backend: go-check generate $(EXECUTABLE)
577577
.PHONY: generate
578578
generate: $(TAGS_PREREQ)
579579
@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)
581581

582582
$(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 $@
584584

585585
.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
587587

588588
$(DIST_DIRS):
589589
mkdir -p $(DIST_DIRS)

modules/options/options_bindata.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
package options
99

10-
//go:generate go run -mod=vendor ../../build/generate-bindata.go ../../options options bindata.go
10+
//go:generate go run ../../build/generate-bindata.go ../../options options bindata.go

modules/public/public_bindata.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
package public
99

10-
//go:generate go run -mod=vendor ../../build/generate-bindata.go ../../public public bindata.go true
10+
//go:generate go run ../../build/generate-bindata.go ../../public public bindata.go true

modules/templates/templates_bindata.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
package templates
99

10-
//go:generate go run -mod=vendor ../../build/generate-bindata.go ../../templates templates bindata.go true
10+
//go:generate go run ../../build/generate-bindata.go ../../templates templates bindata.go true

0 commit comments

Comments
 (0)