From be824890e4abac05526248fe8aed8eca6aceb1da Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Sun, 7 Aug 2022 12:25:03 -0400 Subject: [PATCH] Switch to building with go1.19 (#20695) --- .drone.yml | 26 +++++++++++++------------- .golangci.yml | 4 ++-- Dockerfile | 2 +- Dockerfile.rootless | 2 +- Makefile | 2 +- docs/config.yaml | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3c1cf2a02..57c888a7d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,7 +25,7 @@ steps: - make deps-frontend - name: deps-backend - image: golang:1.18 + image: golang:1.19 pull: always commands: - make deps-backend @@ -88,7 +88,7 @@ steps: depends_on: [deps-frontend] - name: checks-backend - image: golang:1.18 + image: golang:1.19 commands: - make checks-backend depends_on: [deps-backend] @@ -122,7 +122,7 @@ steps: path: /go - name: build-backend-arm64 - image: golang:1.18 + image: golang:1.19 environment: GO111MODULE: on GOPROXY: https://goproxy.io @@ -138,7 +138,7 @@ steps: path: /go - name: build-backend-windows - image: golang:1.18 + image: golang:1.19 environment: GO111MODULE: on GOPROXY: https://goproxy.io @@ -153,7 +153,7 @@ steps: path: /go - name: build-backend-386 - image: golang:1.18 + image: golang:1.19 environment: GO111MODULE: on GOPROXY: https://goproxy.io @@ -243,7 +243,7 @@ steps: - pull_request - name: deps-backend - image: golang:1.18 + image: golang:1.19 pull: always commands: - make deps-backend @@ -360,7 +360,7 @@ steps: path: /go - name: generate-coverage - image: golang:1.18 + image: golang:1.19 commands: - make coverage environment: @@ -436,7 +436,7 @@ steps: - pull_request - name: deps-backend - image: golang:1.18 + image: golang:1.19 pull: always commands: - make deps-backend @@ -578,7 +578,7 @@ trigger: steps: - name: download - image: golang:1.18 + image: golang:1.19 pull: always commands: - timeout -s ABRT 40m make generate-license generate-gitignore @@ -640,7 +640,7 @@ steps: - make deps-frontend - name: deps-backend - image: golang:1.18 + image: golang:1.19 pull: always commands: - make deps-backend @@ -649,7 +649,7 @@ steps: path: /go - name: static - image: techknowlogick/xgo:go-1.18.x + image: techknowlogick/xgo:go-1.19.x pull: always commands: # Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved @@ -760,7 +760,7 @@ steps: - make deps-frontend - name: deps-backend - image: golang:1.18 + image: golang:1.19 pull: always commands: - make deps-backend @@ -769,7 +769,7 @@ steps: path: /go - name: static - image: techknowlogick/xgo:go-1.18.x + image: techknowlogick/xgo:go-1.19.x pull: always commands: # Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved diff --git a/.golangci.yml b/.golangci.yml index 11c58454a..6e80af8c0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -29,7 +29,7 @@ linters: fast: false run: - go: 1.18 + go: 1.19 timeout: 10m skip-dirs: - node_modules @@ -75,7 +75,7 @@ linters-settings: - name: modifies-value-receiver gofumpt: extra-rules: true - lang-version: "1.18" + lang-version: "1.19" depguard: # TODO: use depguard to replace import checks in gitea-vet list-type: denylist diff --git a/Dockerfile b/Dockerfile index e092b5813..d5d98e69a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ #Build stage -FROM golang:1.18-alpine3.16 AS build-env +FROM golang:1.19-alpine3.16 AS build-env ARG GOPROXY ENV GOPROXY ${GOPROXY:-direct} diff --git a/Dockerfile.rootless b/Dockerfile.rootless index c597fb29c..8c2b8e98c 100644 --- a/Dockerfile.rootless +++ b/Dockerfile.rootless @@ -1,5 +1,5 @@ #Build stage -FROM golang:1.18-alpine3.16 AS build-env +FROM golang:1.19-alpine3.16 AS build-env ARG GOPROXY ENV GOPROXY ${GOPROXY:-direct} diff --git a/Makefile b/Makefile index 812d5f4d5..77aac782e 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ SHASUM ?= shasum -a 256 HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" ) COMMA := , -XGO_VERSION := go-1.18.x +XGO_VERSION := go-1.19.x AIR_PACKAGE ?= github.com/cosmtrek/air@v1.40.4 EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.5.0 diff --git a/docs/config.yaml b/docs/config.yaml index 2d15e774e..88406da5d 100644 --- a/docs/config.yaml +++ b/docs/config.yaml @@ -20,7 +20,7 @@ params: website: https://docs.gitea.io version: 1.16.9 minGoVersion: 1.18 - goVersion: 1.18 + goVersion: 1.19 minNodeVersion: 14 outputs: