diff options
-rw-r--r-- | .drone.yml | 28 | ||||
-rw-r--r-- | Dockerfile | 2 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | docs/config.yaml | 2 | ||||
-rw-r--r-- | modules/git/command.go | 1 | ||||
-rw-r--r-- | modules/public/public.go | 3 |
6 files changed, 20 insertions, 18 deletions
diff --git a/.drone.yml b/.drone.yml index 75884cbba1..2738edaf58 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,7 +26,7 @@ steps: - name: lint-backend pull: always - image: golang:1.14 + image: golang:1.15 commands: - make lint-backend environment: @@ -53,7 +53,7 @@ steps: - name: build-backend-arm64 pull: always - image: golang:1.14 + image: golang:1.15 environment: GO111MODULE: on GOPROXY: off @@ -67,7 +67,7 @@ steps: - name: build-backend-386 pull: always - image: golang:1.14 + image: golang:1.15 environment: GO111MODULE: on GOPROXY: off @@ -150,7 +150,7 @@ steps: - name: build pull: always - image: golang:1.14 + image: golang:1.15 commands: - make backend environment: @@ -166,7 +166,7 @@ steps: - name: unit-test pull: always - image: golang:1.14 + image: golang:1.15 commands: - make unit-test-coverage test-check environment: @@ -177,7 +177,7 @@ steps: - name: test-mysql pull: always - image: golang:1.14 + image: golang:1.15 commands: - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - apt-get install -y git-lfs @@ -192,7 +192,7 @@ steps: - name: test-mysql8 pull: always - image: golang:1.14 + image: golang:1.15 commands: - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - apt-get install -y git-lfs @@ -207,7 +207,7 @@ steps: - name: test-mssql pull: always - image: golang:1.14 + image: golang:1.15 commands: - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - apt-get install -y git-lfs @@ -222,7 +222,7 @@ steps: - name: generate-coverage pull: always - image: golang:1.14 + image: golang:1.15 commands: - make coverage environment: @@ -295,7 +295,7 @@ steps: - name: build pull: always - image: golang:1.14 + image: golang:1.15 commands: - make backend environment: @@ -305,7 +305,7 @@ steps: - name: test-sqlite pull: always - image: golang:1.14 + image: golang:1.15 commands: - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - apt-get install -y git-lfs @@ -319,7 +319,7 @@ steps: - name: test-pgsql pull: always - image: golang:1.14 + image: golang:1.15 commands: - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - apt-get install -y git-lfs @@ -427,7 +427,7 @@ steps: - name: static pull: always - image: techknowlogick/xgo:go-1.14.x + image: techknowlogick/xgo:go-1.15.x commands: - apt update && apt -y install curl - curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs @@ -525,7 +525,7 @@ steps: - name: static pull: always - image: techknowlogick/xgo:go-1.14.x + image: techknowlogick/xgo:go-1.15.x commands: - apt update && apt -y install curl - curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs diff --git a/Dockerfile b/Dockerfile index a04324c94e..9c678a60ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ################################### #Build stage -FROM golang:1.14-alpine3.12 AS build-env +FROM golang:1.15-alpine3.12 AS build-env ARG GOPROXY ENV GOPROXY ${GOPROXY:-direct} @@ -25,7 +25,7 @@ SHASUM ?= shasum -a 256 HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" ) COMMA := , -XGO_VERSION := go-1.14.x +XGO_VERSION := go-1.15.x MIN_GO_VERSION := 001012000 MIN_NODE_VERSION := 010013000 diff --git a/docs/config.yaml b/docs/config.yaml index 8b7560a593..3935d04dd3 100644 --- a/docs/config.yaml +++ b/docs/config.yaml @@ -20,7 +20,7 @@ params: website: https://docs.gitea.io version: 1.12.2 minGoVersion: 1.12 - goVersion: 1.14 + goVersion: 1.15 minNodeVersion: 10.13 outputs: diff --git a/modules/git/command.go b/modules/git/command.go index 14fab4ef3c..1496b0186e 100644 --- a/modules/git/command.go +++ b/modules/git/command.go @@ -129,6 +129,7 @@ func (c *Command) RunInDirTimeoutEnvFullPipelineFunc(env []string, timeout time. cmd.Env = append(cmd.Env, fmt.Sprintf("LC_ALL=%s", DefaultLocale)) } + // TODO: verify if this is still needed in golang 1.15 cmd.Env = append(cmd.Env, "GODEBUG=asyncpreemptoff=1") cmd.Dir = dir cmd.Stdout = stdout diff --git a/modules/public/public.go b/modules/public/public.go index 9532c9b366..008fba9b01 100644 --- a/modules/public/public.go +++ b/modules/public/public.go @@ -6,6 +6,7 @@ package public import ( "encoding/base64" + "fmt" "log" "net/http" "path" @@ -158,7 +159,7 @@ func (opts *Options) handle(ctx *macaron.Context, log *log.Logger, opt *Options) // Add an Expires header to the static content if opt.ExpiresAfter > 0 { ctx.Resp.Header().Set("Expires", time.Now().Add(opt.ExpiresAfter).UTC().Format(http.TimeFormat)) - tag := GenerateETag(string(fi.Size()), fi.Name(), fi.ModTime().UTC().Format(http.TimeFormat)) + tag := GenerateETag(fmt.Sprintf("%d", fi.Size()), fi.Name(), fi.ModTime().UTC().Format(http.TimeFormat)) ctx.Resp.Header().Set("ETag", tag) if ctx.Req.Header.Get("If-None-Match") == tag { ctx.Resp.WriteHeader(304) |