Skip to content

Commit

Permalink
Merge pull request #2532 from dprotaso/go-version
Browse files Browse the repository at this point in the history
don't hardcode go version in update codegen script
  • Loading branch information
k8s-ci-robot authored Oct 27, 2023
2 parents ee42a6d + 35f29bc commit cb82fb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ readonly GOMODCACHE="$(go env GOMODCACHE)"
readonly GO111MODULE="on"
readonly GOFLAGS="-mod=readonly"
readonly GOPATH="$(mktemp -d)"
readonly MIN_REQUIRED_GO_VER="1.20"
readonly MIN_REQUIRED_GO_VER="$(go list -m -f '{{.GoVersion}}')"

function go_version_matches {
go version | perl -ne "exit 1 unless m{go version go([0-9]+.[0-9]+)}; exit 1 if (\$1 < ${MIN_REQUIRED_GO_VER})"
Expand Down

0 comments on commit cb82fb5

Please sign in to comment.