From 6f2842c08c2337eb876c1249e13cc7c73f879555 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Wed, 6 Mar 2024 10:04:49 -0500 Subject: [PATCH] Avoid clearing go version in go.work update script --- hack/update-go-workspace.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/hack/update-go-workspace.sh b/hack/update-go-workspace.sh index 815f2c6bafe..72c6ad905fd 100755 --- a/hack/update-go-workspace.sh +++ b/hack/update-go-workspace.sh @@ -32,17 +32,7 @@ kube::golang::setup_env cd "${KUBE_ROOT}" -# Avoid issues and remove the workspace files. -rm -f go.work go.work.sum - -# Generate the workspace. -go work init -( - echo "// This is a generated file. Do not edit directly." - echo - cat go.work -) > .go.work.tmp -mv .go.work.tmp go.work +# Ensure all modules are included in go.work go work edit -use . git ls-files -z ':(glob)./staging/src/k8s.io/*/go.mod' \ | xargs -0 -n1 dirname -z \