Skip to content

Commit

Permalink
Merge remote-tracking branch 'giteaoffical/main'
Browse files Browse the repository at this point in the history
* giteaoffical/main:
  rm .sample hooks which aren't used (go-gitea#19101)
  use go1.18 to build gitea (go-gitea#19099)
  Use `go run` for tool dependencies, require go 1.17 (go-gitea#18874)
  Update golang.org/x/crypto (go-gitea#19097)
  Handle email address not exist. (go-gitea#19089)
  • Loading branch information
zjjhot committed Mar 16, 2022
2 parents 2329882 + 0b15a72 commit a43267b
Show file tree
Hide file tree
Showing 296 changed files with 323 additions and 16,038 deletions.
39 changes: 24 additions & 15 deletions .drone.yml
Expand Up @@ -25,7 +25,7 @@ steps:
- make deps-frontend

- name: deps-backend
image: golang:1.17
image: golang:1.18
pull: always
commands:
- make deps-backend
Expand All @@ -49,18 +49,24 @@ steps:
GOSUMDB: sum.golang.org
TAGS: bindata sqlite sqlite_unlock_notify
depends_on: [deps-backend]
volumes:
- name: deps
path: /go

- name: lint-backend-windows
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
commands:
- make golangci-lint vet
- make golangci-lint-windows vet
environment:
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
GOSUMDB: sum.golang.org
TAGS: bindata sqlite sqlite_unlock_notify
GOOS: windows
GOARCH: amd64
depends_on: [deps-backend]
volumes:
- name: deps
path: /go

- name: lint-backend-gogit
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
Expand All @@ -71,6 +77,9 @@ steps:
GOSUMDB: sum.golang.org
TAGS: bindata gogit sqlite sqlite_unlock_notify
depends_on: [deps-backend]
volumes:
- name: deps
path: /go

- name: checks-frontend
image: node:16
Expand All @@ -79,7 +88,7 @@ steps:
depends_on: [deps-frontend]

- name: checks-backend
image: golang:1.17
image: golang:1.18
commands:
- make checks-backend
depends_on: [deps-backend]
Expand All @@ -100,7 +109,7 @@ steps:
depends_on: [test-frontend]

- name: build-backend-no-gcc
image: golang:1.16 # this step is kept as the lowest version of golang that we support
image: golang:1.17 # this step is kept as the lowest version of golang that we support
pull: always
environment:
GO111MODULE: on
Expand All @@ -113,7 +122,7 @@ steps:
path: /go

- name: build-backend-arm64
image: golang:1.17
image: golang:1.18
environment:
GO111MODULE: on
GOPROXY: https://goproxy.cn
Expand All @@ -129,7 +138,7 @@ steps:
path: /go

- name: build-backend-windows
image: golang:1.17
image: golang:1.18
environment:
GO111MODULE: on
GOPROXY: https://goproxy.cn
Expand All @@ -144,7 +153,7 @@ steps:
path: /go

- name: build-backend-386
image: golang:1.17
image: golang:1.18
environment:
GO111MODULE: on
GOPROXY: https://goproxy.cn
Expand Down Expand Up @@ -233,7 +242,7 @@ steps:
- pull_request

- name: deps-backend
image: golang:1.17
image: golang:1.18
pull: always
commands:
- make deps-backend
Expand Down Expand Up @@ -350,7 +359,7 @@ steps:
path: /go

- name: generate-coverage
image: golang:1.17
image: golang:1.18
commands:
- make coverage
environment:
Expand Down Expand Up @@ -425,7 +434,7 @@ steps:
- pull_request

- name: deps-backend
image: golang:1.17
image: golang:1.18
pull: always
commands:
- make deps-backend
Expand Down Expand Up @@ -567,7 +576,7 @@ trigger:

steps:
- name: download
image: golang:1.17
image: golang:1.18
pull: always
commands:
- timeout -s ABRT 40m make generate-license generate-gitignore
Expand Down Expand Up @@ -628,7 +637,7 @@ steps:
- make deps-frontend

- name: deps-backend
image: golang:1.17
image: golang:1.18
pull: always
commands:
- make deps-backend
Expand All @@ -637,7 +646,7 @@ steps:
path: /go

- name: static
image: techknowlogick/xgo:go-1.17.x
image: techknowlogick/xgo:go-1.18.x
pull: always
commands:
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
Expand Down Expand Up @@ -746,7 +755,7 @@ steps:
- make deps-frontend

- name: deps-backend
image: golang:1.17
image: golang:1.18
pull: always
commands:
- make deps-backend
Expand All @@ -755,7 +764,7 @@ steps:
path: /go

- name: static
image: techknowlogick/xgo:go-1.17.x
image: techknowlogick/xgo:go-1.18.x
pull: always
commands:
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
Expand Down
8 changes: 5 additions & 3 deletions .golangci.yml
Expand Up @@ -13,7 +13,7 @@ linters:
#- gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
- gofmt
- misspell
- gocritic
#- gocritic # TODO: disabled until fixed with go 1.18
- bidichk
- ineffassign
- revive
Expand All @@ -23,7 +23,7 @@ linters:
fast: false

run:
timeout: 3m
timeout: 10m
skip-dirs:
- node_modules
- public
Expand Down Expand Up @@ -64,7 +64,7 @@ linters-settings:
- name: modifies-value-receiver
gofumpt:
extra-rules: true
lang-version: 1.16
lang-version: 1.18

issues:
exclude-rules:
Expand Down Expand Up @@ -152,3 +152,5 @@ issues:
- path: models/user/openid.go
linters:
- golint
- linters: staticcheck
text: "strings.Title is deprecated: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead."
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,5 +1,5 @@
#Build stage
FROM golang:1.17-alpine3.15 AS build-env
FROM golang:1.18-alpine3.15 AS build-env

ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.rootless
@@ -1,5 +1,5 @@
#Build stage
FROM golang:1.17-alpine3.15 AS build-env
FROM golang:1.18-alpine3.15 AS build-env

ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}
Expand Down

0 comments on commit a43267b

Please sign in to comment.