]> source.dussan.org Git - gitea.git/commitdiff
Use vendors when go generate (#7340)
authorLunny Xiao <xiaolunwen@gmail.com>
Sun, 7 Jul 2019 03:00:41 +0000 (11:00 +0800)
committertechknowlogick <techknowlogick@gitea.io>
Sun, 7 Jul 2019 03:00:41 +0000 (23:00 -0400)
* use vendors when go generate

* update docs about golang minimal requirement from 1.9 to 1.11

* fix build

.drone.yml
Makefile
docs/content/doc/advanced/hacking-on-gitea.en-us.md
docs/content/doc/installation/from-source.en-us.md

index 9c075999401314ec6c59847c3e079a0f23db8f7c..086b5cd2b53a7939e4b817f4cde075fb6088e0d2 100644 (file)
@@ -63,9 +63,11 @@ steps:
 
   - name: build-without-gcc
     pull: always
-    image: golang:1.10 # this step is kept as the lowest version of golang that we support
+    image: golang:1.11 # this step is kept as the lowest version of golang that we support
+    environment:
+      GO111MODULE: on
     commands:
-      - go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
+      - go build -mod=vendor -o gitea_no_gcc # test if build succeeds without the sqlite tag
 
   - name: build
     pull: always
index 796a0e3b535a1cfab031bccee9f20b0c8fb64c04..2c6a6ef72ee2a79075335a15706874664462acd2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -97,7 +97,7 @@ vet:
 
 .PHONY: generate
 generate:
-       GO111MODULE=on $(GO) generate $(PACKAGES)
+       GO111MODULE=on $(GO) generate -mod=vendor $(PACKAGES)
 
 .PHONY: generate-swagger
 generate-swagger:
index d04cdfca5bdb76391f135b33347ebe4b859d9730..ef29051e7e06c86053e73b5d1d8c318dc4eb7d00 100644 (file)
@@ -32,7 +32,7 @@ necessary. To be able to use these you must have the `"$GOPATH"/bin` directory
 on the executable path. If you don't add the go bin directory to the
 executable path you will have to manage this yourself.
 
-**Note 2**: Go version 1.9 or higher is required; however, it is important
+**Note 2**: Go version 1.11 or higher is required; however, it is important
 to note that our continuous integration will check that the formatting of the
 source code is not changed by `gofmt` using `make fmt-check`. Unfortunately,
 the results of `gofmt` can differ by the version of `go`. It is therefore
index ce5915cc3fe146a176de032657ca5ac68f4f7eda..cf6d42802e8de85bd82a19500e6faf28a174676b 100644 (file)
@@ -27,7 +27,7 @@ necessary. To be able to use these, you must have the `"$GOPATH/bin"` directory
 on the executable path. If you don't add the go bin directory to the
 executable path, you will have to manage this yourself.
 
-**Note 2**: Go version 1.9 or higher is required. However, it is recommended to
+**Note 2**: Go version 1.11 or higher is required. However, it is recommended to
 obtain the same version as our continuous integration, see the advice given in
 <a href='{{< relref "doc/advanced/hacking-on-gitea.en-us.md" >}}'>Hacking on
 Gitea</a>