Skip to content

go1.15 #12475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 13, 2020
Merged

go1.15 #12475

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ steps:

- name: lint-backend
pull: always
image: golang:1.14
image: golang:1.15
commands:
- make lint-backend
environment:
Expand All @@ -53,7 +53,7 @@ steps:

- name: build-backend-arm64
pull: always
image: golang:1.14
image: golang:1.15
environment:
GO111MODULE: on
GOPROXY: off
Expand All @@ -67,7 +67,7 @@ steps:

- name: build-backend-386
pull: always
image: golang:1.14
image: golang:1.15
environment:
GO111MODULE: on
GOPROXY: off
Expand Down Expand Up @@ -150,7 +150,7 @@ steps:

- name: build
pull: always
image: golang:1.14
image: golang:1.15
commands:
- make backend
environment:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -222,7 +222,7 @@ steps:

- name: generate-coverage
pull: always
image: golang:1.14
image: golang:1.15
commands:
- make coverage
environment:
Expand Down Expand Up @@ -295,7 +295,7 @@ steps:

- name: build
pull: always
image: golang:1.14
image: golang:1.15
commands:
- make backend
environment:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions modules/git/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion modules/public/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package public

import (
"encoding/base64"
"fmt"
"log"
"net/http"
"path"
Expand Down Expand Up @@ -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)
Expand Down