Skip to content

Commit 519ff51

Browse files
committed
Bump openapi-gen, ensure correct Go toolchain is used (incl to compile binaries)
1 parent d728dc3 commit 519ff51

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ GO_VERSION ?= 1.23.0
2727
GO_DIRECTIVE_VERSION ?= 1.23.0
2828
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)
2929

30+
# Ensure correct toolchain is used
31+
GOTOOLCHAIN = go$(GO_VERSION)
32+
export GOTOOLCHAIN
33+
3034
# Use GOPROXY environment variable if set
3135
GOPROXY := $(shell go env GOPROXY)
3236
ifeq ($(GOPROXY),)
@@ -182,7 +186,7 @@ TRIAGE_PARTY_VERSION ?= v1.6.0
182186
CONVERSION_VERIFIER_BIN := conversion-verifier
183187
CONVERSION_VERIFIER := $(abspath $(TOOLS_BIN_DIR)/$(CONVERSION_VERIFIER_BIN))
184188

185-
OPENAPI_GEN_VER := dc4e619 # main branch as of 22.04.2024
189+
OPENAPI_GEN_VER := 2c72e55 # main branch as of 03.01.2025
186190
OPENAPI_GEN_BIN := openapi-gen
187191
# We are intentionally using the binary without version suffix, to avoid the version
188192
# in generated files.
@@ -527,7 +531,7 @@ generate-go-conversions-test-extension: $(CONVERSION_GEN) ## Generate conversion
527531

528532
# The tmp/sigs.k8s.io/cluster-api symlink is a workaround to make this target run outside of GOPATH
529533
.PHONY: generate-go-openapi
530-
generate-go-openapi: $(OPENAPI_GEN) $(CONTROLLER_GEN) ## Generate openapi go code for runtime SDK
534+
generate-go-openapi: $(OPENAPI_GEN) ## Generate openapi go code for runtime SDK
531535
@mkdir -p ./tmp/sigs.k8s.io; ln -s $(ROOT_DIR) ./tmp/sigs.k8s.io/; cd ./tmp; \
532536
for pkg in "api/v1beta1" "$(EXP_DIR)/runtime/hooks/api/v1alpha1"; do \
533537
(cd ../ && $(MAKE) clean-generated-openapi-definitions SRC_DIRS="./$${pkg}"); \

0 commit comments

Comments
 (0)