Skip to content

Commit 2fa1078

Browse files
go 1.14 (#10467)
1 parent e5a008f commit 2fa1078

File tree

12 files changed

+177
-34
lines changed

12 files changed

+177
-34
lines changed

.drone.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ steps:
1919

2020
- name: build-without-gcc
2121
pull: always
22-
image: golang:1.11 # this step is kept as the lowest version of golang that we support
22+
image: golang:1.12 # this step is kept as the lowest version of golang that we support
2323
environment:
2424
GO111MODULE: on
2525
GOPROXY: off
@@ -28,7 +28,7 @@ steps:
2828

2929
- name: build-linux-386
3030
pull: always
31-
image: golang:1.13
31+
image: golang:1.14
3232
environment:
3333
GO111MODULE: on
3434
GOPROXY: off
@@ -39,7 +39,7 @@ steps:
3939

4040
- name: check
4141
pull: always
42-
image: golang:1.13
42+
image: golang:1.14
4343
commands:
4444
- make clean golangci-lint revive swagger-check swagger-validate test-vendor
4545
environment:
@@ -105,7 +105,7 @@ steps:
105105

106106
- name: build
107107
pull: always
108-
image: golang:1.13
108+
image: golang:1.14
109109
commands:
110110
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
111111
- make build
@@ -122,7 +122,7 @@ steps:
122122

123123
- name: unit-test
124124
pull: always
125-
image: golang:1.13
125+
image: golang:1.14
126126
commands:
127127
- make unit-test-coverage test-check
128128
environment:
@@ -133,7 +133,7 @@ steps:
133133

134134
- name: test-mysql
135135
pull: always
136-
image: golang:1.13
136+
image: golang:1.14
137137
commands:
138138
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
139139
- apt-get install -y git-lfs
@@ -147,7 +147,7 @@ steps:
147147

148148
- name: test-mysql8
149149
pull: always
150-
image: golang:1.13
150+
image: golang:1.14
151151
commands:
152152
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
153153
- apt-get install -y git-lfs
@@ -161,7 +161,7 @@ steps:
161161

162162
- name: test-mssql
163163
pull: always
164-
image: golang:1.13
164+
image: golang:1.14
165165
commands:
166166
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
167167
- apt-get install -y git-lfs
@@ -175,7 +175,7 @@ steps:
175175

176176
- name: generate-coverage
177177
pull: always
178-
image: golang:1.13
178+
image: golang:1.14
179179
commands:
180180
- make coverage
181181
environment:
@@ -248,7 +248,7 @@ steps:
248248

249249
- name: build
250250
pull: always
251-
image: golang:1.13
251+
image: golang:1.14
252252
commands:
253253
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
254254
- make build
@@ -259,7 +259,7 @@ steps:
259259

260260
- name: test-sqlite
261261
pull: always
262-
image: golang:1.13
262+
image: golang:1.14
263263
commands:
264264
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
265265
- apt-get install -y git-lfs
@@ -272,7 +272,7 @@ steps:
272272

273273
- name: test-pgsql
274274
pull: always
275-
image: golang:1.13
275+
image: golang:1.14
276276
commands:
277277
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
278278
- apt-get install -y git-lfs
@@ -379,7 +379,7 @@ steps:
379379

380380
- name: static
381381
pull: always
382-
image: techknowlogick/xgo:go-1.13.x
382+
image: techknowlogick/xgo:go-1.14.x
383383
commands:
384384
- apt update && apt -y install curl
385385
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
@@ -477,7 +477,7 @@ steps:
477477

478478
- name: static
479479
pull: always
480-
image: techknowlogick/xgo:go-1.13.x
480+
image: techknowlogick/xgo:go-1.14.x
481481
commands:
482482
- apt update && apt -y install curl
483483
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
###################################
33
#Build stage
4-
FROM golang:1.13-alpine3.11 AS build-env
4+
FROM golang:1.14-alpine3.11 AS build-env
55

66
ARG GOPROXY
77
ENV GOPROXY ${GOPROXY:-direct}

Makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ SHASUM ?= shasum -a 256
99
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
1010
COMMA := ,
1111

12+
XGO_VERSION := go-1.14.x
13+
MIN_GO_VERSION := 001012000
14+
MIN_NODE_VERSION := 010000000
15+
1216
ifeq ($(HAS_GO), GO)
1317
GOPATH ?= $(shell $(GO) env GOPATH)
1418
export PATH := $(GOPATH)/bin:$(PATH)
@@ -145,8 +149,8 @@ help:
145149
.PHONY: go-check
146150
go-check:
147151
$(eval GO_VERSION := $(shell printf "%03d%03d%03d" $(shell go version | grep -Eo '[0-9]+\.?[0-9]+?\.?[0-9]?[[:space:]]' | tr '.' ' ');))
148-
@if [ "$(GO_VERSION)" -lt "001011000" ]; then \
149-
echo "Gitea requires Go 1.11 or greater to build. You can get it at https://golang.org/dl/"; \
152+
@if [ "$(GO_VERSION)" -lt "$(MIN_GO_VERSION)" ]; then \
153+
echo "Gitea requires Go 1.12 or greater to build. You can get it at https://golang.org/dl/"; \
150154
exit 1; \
151155
fi
152156

@@ -161,7 +165,7 @@ git-check:
161165
node-check:
162166
$(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | grep -Eo '[0-9]+\.?[0-9]+?\.?[0-9]?' | tr '.' ' ');))
163167
$(eval NPM_MISSING := $(shell hash npm > /dev/null 2>&1 || echo 1))
164-
@if [ "$(NODE_VERSION)" -lt "010000000" -o "$(NPM_MISSING)" = "1" ]; then \
168+
@if [ "$(NODE_VERSION)" -lt "$(MIN_NODE_VERSION)" -o "$(NPM_MISSING)" = "1" ]; then \
165169
echo "Gitea requires Node.js 10 or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
166170
exit 1; \
167171
fi
@@ -480,7 +484,7 @@ release-windows: | $(DIST_DIRS)
480484
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
481485
$(GO) get -u src.techknowlogick.com/xgo; \
482486
fi
483-
xgo -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
487+
xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
484488
ifeq ($(CI),drone)
485489
cp /build/* $(DIST)/binaries
486490
endif
@@ -490,7 +494,7 @@ release-linux: | $(DIST_DIRS)
490494
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
491495
$(GO) get -u src.techknowlogick.com/xgo; \
492496
fi
493-
xgo -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/mips64le,linux/mips,linux/mipsle' -out gitea-$(VERSION) .
497+
xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/mips64le,linux/mips,linux/mipsle' -out gitea-$(VERSION) .
494498
ifeq ($(CI),drone)
495499
cp /build/* $(DIST)/binaries
496500
endif
@@ -500,7 +504,7 @@ release-darwin: | $(DIST_DIRS)
500504
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
501505
$(GO) get -u src.techknowlogick.com/xgo; \
502506
fi
503-
xgo -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) .
507+
xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) .
504508
ifeq ($(CI),drone)
505509
cp /build/* $(DIST)/binaries
506510
endif

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ or if sqlite support is required:
3939

4040
The `build` target is split into two sub-targets:
4141

42-
- `make backend` which requires [Go 1.11](https://golang.org/dl/) or greater.
42+
- `make backend` which requires [Go 1.12](https://golang.org/dl/) or greater.
4343
- `make frontend` which requires [Node.js 10](https://nodejs.org/en/download/) or greater.
4444

4545
If pre-built frontend files are present it is possible to only build the backend:

docs/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ params:
1919
author: The Gitea Authors
2020
website: https://docs.gitea.io
2121
version: 1.11.3
22-
minGoVersion: 1.11
23-
goVersion: 1.13
22+
minGoVersion: 1.12
23+
goVersion: 1.14
2424
minNodeVersion: 10
2525

2626
outputs:

go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module code.gitea.io/gitea
22

3-
go 1.13
3+
go 1.14
44

55
require (
66
cloud.google.com/go v0.45.0 // indirect
@@ -50,6 +50,7 @@ require (
5050
github.com/gobwas/glob v0.2.3
5151
github.com/gogs/chardet v0.0.0-20191104214054-4b6791f73a28
5252
github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14
53+
github.com/golang/protobuf v1.3.4 // indirect
5354
github.com/google/go-github/v24 v24.0.1
5455
github.com/gorilla/context v1.1.1
5556
github.com/huandu/xstrings v1.3.0
@@ -91,6 +92,7 @@ require (
9192
github.com/steveyen/gtreap v0.0.0-20150807155958-0abe01ef9be2 // indirect
9293
github.com/stretchr/testify v1.4.0
9394
github.com/tecbot/gorocksdb v0.0.0-20181010114359-8752a9433481 // indirect
95+
github.com/tinylib/msgp v1.1.1 // indirect
9496
github.com/tstranex/u2f v1.0.0
9597
github.com/unknwon/cae v1.0.0
9698
github.com/unknwon/com v1.0.1

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
269269
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
270270
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
271271
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
272+
github.com/golang/protobuf v1.3.4 h1:87PNWwrRvUSnqS4dlcBU/ftvOIBep4sYuBLlh6rX2wk=
273+
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
272274
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
273275
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
274276
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
@@ -553,6 +555,8 @@ github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
553555
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
554556
github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU=
555557
github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
558+
github.com/tinylib/msgp v1.1.1 h1:TnCZ3FIuKeaIy+F45+Cnp+caqdXGy4z74HvwXN+570Y=
559+
github.com/tinylib/msgp v1.1.1/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
556560
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
557561
github.com/toqueteos/trie v1.0.0 h1:8i6pXxNUXNRAqP246iibb7w/pSFquNTQ+uNfriG7vlk=
558562
github.com/toqueteos/trie v1.0.0/go.mod h1:Ywk48QhEqhU1+DwhMkJ2x7eeGxDHiGkAdc9+0DYcbsM=

vendor/github.com/golang/protobuf/proto/lib.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/golang/protobuf/proto/text.go

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/tinylib/msgp/msgp/extension.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/tinylib/msgp/msgp/read_bytes.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)