From b5b8c9d869854e03f995bc7fdeadf82ae3975b65 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 24 Dec 2023 15:01:18 -0800 Subject: [PATCH] Make update-codegen swagger work on gengo/v2 --- hack/lib/util.sh | 10 +++++----- hack/update-codegen.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hack/lib/util.sh b/hack/lib/util.sh index a16f6e57473..549a48175d1 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -322,14 +322,14 @@ kube::util::group-version-to-pkg-path() { # Change "foo.bar.k8s.io/v1" -> "foo/v1" notation. local simple_gv="${group_version/.*k8s.io/}" if [[ "${api}" = "${simple_gv}" ]]; then - echo "vendor/k8s.io/api/${simple_gv}" + echo "staging/src/k8s.io/api/${simple_gv}" return fi done # "v1" is the API GroupVersion if [[ "${group_version}" == "v1" ]]; then - echo "vendor/k8s.io/api/core/v1" + echo "staging/src/k8s.io/api/core/v1" return fi @@ -342,13 +342,13 @@ kube::util::group-version-to-pkg-path() { echo "pkg/apis/core" ;; meta/v1) - echo "vendor/k8s.io/apimachinery/pkg/apis/meta/v1" + echo "staging/src/k8s.io/apimachinery/pkg/apis/meta/v1" ;; meta/v1beta1) - echo "vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1" + echo "staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1" ;; internal.apiserver.k8s.io/v1alpha1) - echo "vendor/k8s.io/api/apiserverinternal/v1alpha1" + echo "staging/src/k8s.io/api/apiserverinternal/v1alpha1" ;; *.k8s.io) echo "pkg/apis/${group_version%.*k8s.io}" diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index f97601c960e..dedcd9cf1e8 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -247,7 +247,7 @@ EOF # first in the case of regenerating everything. function codegen::swagger() { # Build the tool - GO111MODULE=on GOPROXY=off go install \ + GOPROXY=off go install \ ./cmd/genswaggertypedocs local group_versions=()