Skip to content

Commit 87404d7

Browse files
lunnytechknowlogick
authored andcommitted
Use vendors when go generate (#7340)
* use vendors when go generate * update docs about golang minimal requirement from 1.9 to 1.11 * fix build
1 parent f369788 commit 87404d7

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.drone.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ steps:
6363

6464
- name: build-without-gcc
6565
pull: always
66-
image: golang:1.10 # this step is kept as the lowest version of golang that we support
66+
image: golang:1.11 # this step is kept as the lowest version of golang that we support
67+
environment:
68+
GO111MODULE: on
6769
commands:
68-
- go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
70+
- go build -mod=vendor -o gitea_no_gcc # test if build succeeds without the sqlite tag
6971

7072
- name: build
7173
pull: always

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ vet:
9797

9898
.PHONY: generate
9999
generate:
100-
GO111MODULE=on $(GO) generate $(PACKAGES)
100+
GO111MODULE=on $(GO) generate -mod=vendor $(PACKAGES)
101101

102102
.PHONY: generate-swagger
103103
generate-swagger:

docs/content/doc/advanced/hacking-on-gitea.en-us.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ necessary. To be able to use these you must have the `"$GOPATH"/bin` directory
3232
on the executable path. If you don't add the go bin directory to the
3333
executable path you will have to manage this yourself.
3434

35-
**Note 2**: Go version 1.9 or higher is required; however, it is important
35+
**Note 2**: Go version 1.11 or higher is required; however, it is important
3636
to note that our continuous integration will check that the formatting of the
3737
source code is not changed by `gofmt` using `make fmt-check`. Unfortunately,
3838
the results of `gofmt` can differ by the version of `go`. It is therefore

docs/content/doc/installation/from-source.en-us.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ necessary. To be able to use these, you must have the `"$GOPATH/bin"` directory
2727
on the executable path. If you don't add the go bin directory to the
2828
executable path, you will have to manage this yourself.
2929

30-
**Note 2**: Go version 1.9 or higher is required. However, it is recommended to
30+
**Note 2**: Go version 1.11 or higher is required. However, it is recommended to
3131
obtain the same version as our continuous integration, see the advice given in
3232
<a href='{{< relref "doc/advanced/hacking-on-gitea.en-us.md" >}}'>Hacking on
3333
Gitea</a>

0 commit comments

Comments
 (0)