circleci right go version
This commit is contained in:
parent
20bd597f34
commit
cdde64b6f2
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user