Merge pull request #18156 from wojtek-t/use_new_deep_copies

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot
2015-12-30 05:11:02 -08:00
7 changed files with 2660 additions and 2397 deletions

View File

@@ -23,8 +23,9 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
kube::golang::setup_env
setgen=$(kube::util::find-binary "set-gen")
clientgen=$(kube::util::find-binary "client-gen")
deepcopygen=$(kube::util::find-binary "deepcopy-gen")
setgen=$(kube::util::find-binary "set-gen")
# Please do not add any logic to this shell script. Add logic to the go code
# that generates the set-gen program.
@@ -33,6 +34,7 @@ clientgen=$(kube::util::find-binary "client-gen")
# update- and verify- scripts.
${clientgen} "$@"
${clientgen} -t "$@"
${deepcopygen} "$@"
${setgen} "$@"
# You may add additional calls of code generators like set-gen above.

View File

@@ -50,13 +50,18 @@ function generate_deep_copies() {
# Ensure that the version being processed is registered by setting
# KUBE_API_VERSIONS.
if [ -z ${ver##*/} ]; then
apiVersions=""
apiVersions=""
else
apiVersions="${ver}"
fi
KUBE_API_VERSIONS="${apiVersions}" generate_version "${ver}"
done
}
# v1 is in the group ""
DEFAULT_VERSIONS="/ v1 extensions/ extensions/v1beta1 componentconfig/ componentconfig/v1alpha1 metrics/ metrics/v1alpha1"
# Currently pkg/api/deep_copy_generated.go is generated by the new go2idl generator.
# All others (mentioned above) are still generated by the old reflection-based generator.
# TODO: Migrate these to the new generator.
DEFAULT_VERSIONS="v1 extensions/ extensions/v1beta1 componentconfig/ componentconfig/v1alpha1 metrics/ metrics/v1alpha1"
VERSIONS=${VERSIONS:-$DEFAULT_VERSIONS}
generate_deep_copies "$VERSIONS"

View File

@@ -26,6 +26,7 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
kube::golang::setup_env
"${KUBE_ROOT}/hack/build-go.sh" cmd/libs/go2idl/client-gen
"${KUBE_ROOT}/hack/build-go.sh" cmd/libs/go2idl/deepcopy-gen
"${KUBE_ROOT}/hack/build-go.sh" cmd/libs/go2idl/set-gen
"${KUBE_ROOT}/hack/after-build/run-codegen.sh" "$@"

View File

@@ -26,6 +26,7 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
kube::golang::setup_env
"${KUBE_ROOT}/hack/build-go.sh" cmd/libs/go2idl/client-gen
"${KUBE_ROOT}/hack/build-go.sh" cmd/libs/go2idl/deepcopy-gen
"${KUBE_ROOT}/hack/build-go.sh" cmd/libs/go2idl/set-gen
"${KUBE_ROOT}/hack/after-build/run-codegen.sh" --verify-only