Make update-codegen deepcopy work on gengo/v2

This commit is contained in:
Tim Hockin 2023-12-24 11:03:00 -08:00
parent d5e8e9c29c
commit 1fb4e824ba
No known key found for this signature in database

View File

@ -137,7 +137,7 @@ function codegen::protobuf() {
# scheme # scheme
function codegen::deepcopy() { function codegen::deepcopy() {
# Build the tool. # Build the tool.
GO111MODULE=on GOPROXY=off go install \ GOPROXY=off go install \
k8s.io/code-generator/cmd/deepcopy-gen k8s.io/code-generator/cmd/deepcopy-gen
# The result file, in each pkg, of deep-copy generation. # The result file, in each pkg, of deep-copy generation.
@ -162,7 +162,7 @@ function codegen::deepcopy() {
local tag_pkgs=() local tag_pkgs=()
for dir in "${tag_dirs[@]}"; do for dir in "${tag_dirs[@]}"; do
tag_pkgs+=("${PRJ_SRC_PATH}/$dir") tag_pkgs+=("./$dir")
done done
kube::log::status "Generating deepcopy code for ${#tag_pkgs[@]} targets" kube::log::status "Generating deepcopy code for ${#tag_pkgs[@]} targets"
@ -175,7 +175,7 @@ function codegen::deepcopy() {
git_find -z ':(glob)**'/"${output_file}.go" | xargs -0 rm -f git_find -z ':(glob)**'/"${output_file}.go" | xargs -0 rm -f
./hack/run-in-gopath.sh "${gen_deepcopy_bin}" \ "${gen_deepcopy_bin}" \
--v "${KUBE_VERBOSE}" \ --v "${KUBE_VERBOSE}" \
--logtostderr \ --logtostderr \
--go-header-file "${BOILERPLATE_FILENAME}" \ --go-header-file "${BOILERPLATE_FILENAME}" \