* 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 <lauris@nix.lv>
pull/12473/head^2
techknowlogick 4 years ago committed by GitHub
parent e01bac8404
commit bd7d6a3d73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 28
      .drone.yml
  2. 2
      Dockerfile
  3. 2
      Makefile
  4. 2
      docs/config.yaml
  5. 1
      modules/git/command.go
  6. 3
      modules/public/public.go

@ -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

@ -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

@ -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:

@ -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

@ -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)

Loading…
Cancel
Save