circleci right go version

This commit is contained in:
Andrew Jackson (Ajax) 2023-09-21 17:25:58 -05:00
parent 20bd597f34
commit cdde64b6f2
3 changed files with 17 additions and 5 deletions

View File

@ -164,7 +164,7 @@ jobs:
default: unit default: unit
description: Test suite name to report to CircleCI. description: Test suite name to report to CircleCI.
docker: docker:
- image: cimg/go:1.19.7 - image: cimg/go:1.20.7
environment: environment:
LOTUS_HARMONYDB_HOSTS: yugabyte LOTUS_HARMONYDB_HOSTS: yugabyte
- image: yugabytedb/yugabyte:latest - image: yugabytedb/yugabyte:latest
@ -218,7 +218,7 @@ jobs:
test with. If empty (the default) the commit defined by the git test with. If empty (the default) the commit defined by the git
submodule is used. submodule is used.
docker: docker:
- image: cimg/go:1.19.7 - image: cimg/go:1.20.7
resource_class: << parameters.resource_class >> resource_class: << parameters.resource_class >>
steps: steps:
- install-ubuntu-deps - install-ubuntu-deps
@ -412,7 +412,7 @@ jobs:
description: | description: |
Arguments to pass to golangci-lint Arguments to pass to golangci-lint
docker: docker:
- image: cimg/go:1.19.7 - image: cimg/go:1.20.7
resource_class: medium+ resource_class: medium+
steps: steps:
- install-ubuntu-deps - install-ubuntu-deps

View File

@ -10,13 +10,25 @@ import (
"text/template" "text/template"
) )
const GoVersion = "1.19.7" var GoVersion = "" // from init below. Ex: 1.19.7
//go:generate go run ./gen.go .. //go:generate go run ./gen.go ..
//go:embed template.yml //go:embed template.yml
var templateFile embed.FS var templateFile embed.FS
func init() {
b, err := os.ReadFile("../go.mod")
if err != nil {
panic("cannot find go.mod in parent folder")
}
for _, line := range strings.Split(string(b), "\n") {
if strings.HasPrefix(line, "go ") {
GoVersion = line[3:]
}
}
}
type ( type (
dirs = []string dirs = []string
suite = string suite = string

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/filecoin-project/lotus module github.com/filecoin-project/lotus
go 1.19 go 1.20.7
retract v1.14.0 // Accidentally force-pushed tag, use v1.14.1+ instead. retract v1.14.0 // Accidentally force-pushed tag, use v1.14.1+ instead.