Skip to content

Commit bd7d6a3

Browse files
go1.15 (#12475)
* go1.15 * update makefile xgo version * fix vet issue * update docs to version of go in use * add TODO for asyncpreemptoff Co-authored-by: Lauris BH <[email protected]>
1 parent e01bac8 commit bd7d6a3

File tree

6 files changed

+20
-18
lines changed

6 files changed

+20
-18
lines changed

.drone.yml

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

2727
- name: lint-backend
2828
pull: always
29-
image: golang:1.14
29+
image: golang:1.15
3030
commands:
3131
- make lint-backend
3232
environment:
@@ -53,7 +53,7 @@ steps:
5353

5454
- name: build-backend-arm64
5555
pull: always
56-
image: golang:1.14
56+
image: golang:1.15
5757
environment:
5858
GO111MODULE: on
5959
GOPROXY: off
@@ -67,7 +67,7 @@ steps:
6767

6868
- name: build-backend-386
6969
pull: always
70-
image: golang:1.14
70+
image: golang:1.15
7171
environment:
7272
GO111MODULE: on
7373
GOPROXY: off
@@ -150,7 +150,7 @@ steps:
150150

151151
- name: build
152152
pull: always
153-
image: golang:1.14
153+
image: golang:1.15
154154
commands:
155155
- make backend
156156
environment:
@@ -166,7 +166,7 @@ steps:
166166

167167
- name: unit-test
168168
pull: always
169-
image: golang:1.14
169+
image: golang:1.15
170170
commands:
171171
- make unit-test-coverage test-check
172172
environment:
@@ -177,7 +177,7 @@ steps:
177177

178178
- name: test-mysql
179179
pull: always
180-
image: golang:1.14
180+
image: golang:1.15
181181
commands:
182182
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
183183
- apt-get install -y git-lfs
@@ -192,7 +192,7 @@ steps:
192192

193193
- name: test-mysql8
194194
pull: always
195-
image: golang:1.14
195+
image: golang:1.15
196196
commands:
197197
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
198198
- apt-get install -y git-lfs
@@ -207,7 +207,7 @@ steps:
207207

208208
- name: test-mssql
209209
pull: always
210-
image: golang:1.14
210+
image: golang:1.15
211211
commands:
212212
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
213213
- apt-get install -y git-lfs
@@ -222,7 +222,7 @@ steps:
222222

223223
- name: generate-coverage
224224
pull: always
225-
image: golang:1.14
225+
image: golang:1.15
226226
commands:
227227
- make coverage
228228
environment:
@@ -295,7 +295,7 @@ steps:
295295

296296
- name: build
297297
pull: always
298-
image: golang:1.14
298+
image: golang:1.15
299299
commands:
300300
- make backend
301301
environment:
@@ -305,7 +305,7 @@ steps:
305305

306306
- name: test-sqlite
307307
pull: always
308-
image: golang:1.14
308+
image: golang:1.15
309309
commands:
310310
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
311311
- apt-get install -y git-lfs
@@ -319,7 +319,7 @@ steps:
319319

320320
- name: test-pgsql
321321
pull: always
322-
image: golang:1.14
322+
image: golang:1.15
323323
commands:
324324
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
325325
- apt-get install -y git-lfs
@@ -427,7 +427,7 @@ steps:
427427

428428
- name: static
429429
pull: always
430-
image: techknowlogick/xgo:go-1.14.x
430+
image: techknowlogick/xgo:go-1.15.x
431431
commands:
432432
- apt update && apt -y install curl
433433
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
@@ -525,7 +525,7 @@ steps:
525525

526526
- name: static
527527
pull: always
528-
image: techknowlogick/xgo:go-1.14.x
528+
image: techknowlogick/xgo:go-1.15.x
529529
commands:
530530
- apt update && apt -y install curl
531531
- 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.14-alpine3.12 AS build-env
4+
FROM golang:1.15-alpine3.12 AS build-env
55

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

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SHASUM ?= shasum -a 256
2525
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
2626
COMMA := ,
2727

28-
XGO_VERSION := go-1.14.x
28+
XGO_VERSION := go-1.15.x
2929
MIN_GO_VERSION := 001012000
3030
MIN_NODE_VERSION := 010013000
3131

docs/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ params:
2020
website: https://docs.gitea.io
2121
version: 1.12.2
2222
minGoVersion: 1.12
23-
goVersion: 1.14
23+
goVersion: 1.15
2424
minNodeVersion: 10.13
2525

2626
outputs:

modules/git/command.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ func (c *Command) RunInDirTimeoutEnvFullPipelineFunc(env []string, timeout time.
129129
cmd.Env = append(cmd.Env, fmt.Sprintf("LC_ALL=%s", DefaultLocale))
130130
}
131131

132+
// TODO: verify if this is still needed in golang 1.15
132133
cmd.Env = append(cmd.Env, "GODEBUG=asyncpreemptoff=1")
133134
cmd.Dir = dir
134135
cmd.Stdout = stdout

modules/public/public.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package public
66

77
import (
88
"encoding/base64"
9+
"fmt"
910
"log"
1011
"net/http"
1112
"path"
@@ -158,7 +159,7 @@ func (opts *Options) handle(ctx *macaron.Context, log *log.Logger, opt *Options)
158159
// Add an Expires header to the static content
159160
if opt.ExpiresAfter > 0 {
160161
ctx.Resp.Header().Set("Expires", time.Now().Add(opt.ExpiresAfter).UTC().Format(http.TimeFormat))
161-
tag := GenerateETag(string(fi.Size()), fi.Name(), fi.ModTime().UTC().Format(http.TimeFormat))
162+
tag := GenerateETag(fmt.Sprintf("%d", fi.Size()), fi.Name(), fi.ModTime().UTC().Format(http.TimeFormat))
162163
ctx.Resp.Header().Set("ETag", tag)
163164
if ctx.Req.Header.Get("If-None-Match") == tag {
164165
ctx.Resp.WriteHeader(304)

0 commit comments

Comments
 (0)