From ec42d9c48d181ba93f8a92534d0d81f132bf1886 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Fri, 20 Sep 2024 11:08:55 +0530 Subject: [PATCH] tools/go.mod: Update the go version from 1.22.0 to 1.22.1 Latest release of golangci-lint uses `go 1.22.1` as part of go mod file so when our tooling try to consume this version then following is added for `tools/go.mod` because in our mod file we mention minimum required go version is `1.22.0` and as per go toolchain guideline it should run in in newer toolchain ``` go 1.22.0 toolchain go1.22.5 ``` snip from: https://go.dev/doc/toolchain ``` When the go or toolchain line is newer than the bundled toolchain, the go command runs the newer toolchain instead. For example, when using the go command bundled with Go 1.21.3 in a main module that says go 1.21.9, the go command finds and runs Go 1.21.9 instead. It first looks in the PATH for a program named go1.21.9 and otherwise downloads and caches a copy of the Go 1.21.9 toolchain. ``` - https://github.com/golangci/golangci-lint/blob/v1.61.0/go.mod#L3 --- tools/go.mod | 2 +- update-go-version.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/go.mod b/tools/go.mod index c84a69e136..e43433507f 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,6 +1,6 @@ module github.com/crc-org/crc/tools -go 1.22.0 +go 1.22.1 require ( github.com/cfergeau/gomod2rpmdeps v0.0.0-20210223144124-2042c4850ca8 diff --git a/update-go-version.sh b/update-go-version.sh index 53d12bc7e7..516fd13cd0 100755 --- a/update-go-version.sh +++ b/update-go-version.sh @@ -10,7 +10,7 @@ golang_base_version=$1 echo "Updating golang version to $golang_base_version" go mod edit -go "${golang_base_version}.0" -go mod edit -go "${golang_base_version}.0" tools/go.mod +go mod edit -go "${golang_base_version}.1" tools/go.mod sed -i "s,^GOVERSION = 1.[0-9]\+,GOVERSION = ${golang_base_version}," Makefile sed -i "s,^\(FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-\)1.[0-9]\+,\1${golang_base_version}," images/*/Dockerfile