1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 06:46:36 +01:00

build: bump go version to 1.23

This commit is contained in:
Thuan Vo
2025-01-23 11:14:53 -08:00
parent ed9225756b
commit 20d304f7dc
14 changed files with 14 additions and 16 deletions

View File

@@ -10,7 +10,7 @@ run:
- ^scripts
- ^terraform
- ^upi
go: '1.22'
go: '1.23'
modules-download-mode: vendor
allow-parallel-runners: true
output:

View File

@@ -18,8 +18,6 @@ We follow a hard flattening approach; i.e. direct and inherited dependencies are
Dependencies are managed with [Go Modules](https://github.com/golang/go/wiki/Modules) but committed directly to the repository.
We require at least Go 1.22.
- Add or update a dependency with `go get <dependency>@<version>`.
- If you want to use a fork of a project or ensure that a dependency is not updated even when another dependency requires a newer version of it, manually add a [replace directive in the go.mod file](https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive).
- Run `go mod tidy` to tidy `go.mod` and update `go.sum`, then commit the changes.

4
go.mod
View File

@@ -1,8 +1,8 @@
module github.com/openshift/installer
go 1.22.0
go 1.23.0
toolchain go1.22.4
toolchain go1.23.5
require (
cloud.google.com/go/monitoring v1.20.1

View File

@@ -5,7 +5,7 @@ set -e
TARGET_OS_ARCH=$(go env GOOS)_$(go env GOARCH)
CLUSTER_API_BIN_DIR="${PWD}/cluster-api/bin/${TARGET_OS_ARCH}"
CLUSTER_API_MIRROR_DIR="${PWD}/pkg/clusterapi/mirror/"
ENVTEST_K8S_VERSION="1.31.0"
ENVTEST_K8S_VERSION="1.32.0"
ENVTEST_ARCH=$(go env GOOS)-$(go env GOARCH)
copy_cluster_api_to_mirror() {

View File

@@ -5,7 +5,7 @@ set -ex
# shellcheck disable=SC2068
version() { IFS="."; printf "%03d%03d%03d\\n" $@; unset IFS;}
minimum_go_version=1.22
minimum_go_version=1.23
current_go_version=$(go version | cut -d " " -f 3)
if [ "$(version "${current_go_version#go}")" -lt "$(version "$minimum_go_version")" ]; then

View File

@@ -61,7 +61,7 @@ build_terraform_and_providers() {
fi
}
minimum_go_version=1.22
minimum_go_version=1.23
current_go_version=$(go version | cut -d " " -f 3)
if [ "$(version "${current_go_version#go}")" -lt "$(version "$minimum_go_version")" ]; then

View File

@@ -11,6 +11,6 @@ else
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
--workdir /go/src/github.com/openshift/installer \
docker.io/golang:1.22 \
docker.io/golang:1.23 \
./hack/go-fmt.sh "${@}"
fi

View File

@@ -10,6 +10,6 @@ else
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
--workdir /go/src/github.com/openshift/installer \
docker.io/golang:1.22 \
docker.io/golang:1.23 \
./hack/go-genmock.sh "${@}"
fi

View File

@@ -12,6 +12,6 @@ else
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
--workdir /go/src/github.com/openshift/installer \
docker.io/golang:1.22 \
docker.io/golang:1.23 \
./hack/go-sec.sh "${@}"
fi

View File

@@ -8,6 +8,6 @@ else
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
--workdir /go/src/github.com/openshift/installer \
docker.io/golang:1.22 \
docker.io/golang:1.23 \
./hack/go-test.sh "${@}"
fi

View File

@@ -6,6 +6,6 @@ else
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
--workdir /go/src/github.com/openshift/installer \
docker.io/golang:1.22 \
docker.io/golang:1.23 \
./hack/go-vet.sh "${@}"
fi;

View File

@@ -80,6 +80,6 @@ else
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
--workdir /go/src/github.com/openshift/installer \
docker.io/golang:1.22 \
docker.io/golang:1.23 \
./hack/verify-capi-manifests.sh "${@}"
fi

View File

@@ -10,6 +10,6 @@ else
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
--workdir /go/src/github.com/openshift/installer \
docker.io/golang:1.22 \
docker.io/golang:1.23 \
./hack/verify-codegen.sh "${@}"
fi

View File

@@ -39,6 +39,6 @@ else
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
--workdir /go/src/github.com/openshift/installer \
docker.io/golang:1.22 \
docker.io/golang:1.23 \
./hack/verify-vendor.sh "${@}"
fi