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:
@@ -10,7 +10,7 @@ run:
|
||||
- ^scripts
|
||||
- ^terraform
|
||||
- ^upi
|
||||
go: '1.22'
|
||||
go: '1.23'
|
||||
modules-download-mode: vendor
|
||||
allow-parallel-runners: true
|
||||
output:
|
||||
|
||||
@@ -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
4
go.mod
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user