mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Codegen: rm protobindings
This commit is contained in:
parent
4dae505d53
commit
c8ce229e64
@ -778,10 +778,33 @@ function codegen::subprojects() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function codegen::protobindings() {
|
function codegen::protobindings() {
|
||||||
|
# Each element of this array is a directory containing subdirectories which
|
||||||
|
# eventually contain a file named "api.proto".
|
||||||
|
local apis=(
|
||||||
|
"staging/src/k8s.io/cri-api/pkg/apis/runtime"
|
||||||
|
|
||||||
|
"staging/src/k8s.io/kubelet/pkg/apis/podresources"
|
||||||
|
|
||||||
|
"staging/src/k8s.io/kubelet/pkg/apis/deviceplugin"
|
||||||
|
|
||||||
|
"staging/src/k8s.io/kms/apis"
|
||||||
|
"staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2"
|
||||||
|
|
||||||
|
"staging/src/k8s.io/kubelet/pkg/apis/dra"
|
||||||
|
|
||||||
|
"staging/src/k8s.io/kubelet/pkg/apis/pluginregistration"
|
||||||
|
"pkg/kubelet/pluginmanager/pluginwatcher/example_plugin_apis"
|
||||||
|
)
|
||||||
|
|
||||||
|
for api in "${apis[@]}"; do
|
||||||
|
git ls-files -z -cmo --exclude-standard ":(glob)${api}"/'**/api.pb.go' \
|
||||||
|
| xargs -0 rm -f
|
||||||
|
done
|
||||||
|
|
||||||
# NOTE: All output from this script needs to be copied back to the calling
|
# NOTE: All output from this script needs to be copied back to the calling
|
||||||
# source tree. This is managed in kube::build::copy_output in build/common.sh.
|
# source tree. This is managed in kube::build::copy_output in build/common.sh.
|
||||||
# If the output set is changed update that function.
|
# If the output set is changed update that function.
|
||||||
build/run.sh hack/update-generated-proto-bindings-dockerized.sh
|
build/run.sh hack/update-generated-proto-bindings-dockerized.sh "${apis[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -24,25 +24,12 @@ KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../" && pwd -P)"
|
|||||||
|
|
||||||
source "${KUBE_ROOT}/hack/lib/protoc.sh"
|
source "${KUBE_ROOT}/hack/lib/protoc.sh"
|
||||||
|
|
||||||
# Each element of this array is a directory containing subdirectories which
|
if [ "$#" = 0 ]; then
|
||||||
# eventually contain a file named "api.proto".
|
echo "usage: $0 <api_dir>..."
|
||||||
APIS=(
|
exit 1
|
||||||
"staging/src/k8s.io/cri-api/pkg/apis/runtime"
|
fi
|
||||||
|
|
||||||
"staging/src/k8s.io/kubelet/pkg/apis/podresources"
|
for api; do
|
||||||
|
|
||||||
"staging/src/k8s.io/kubelet/pkg/apis/deviceplugin"
|
|
||||||
|
|
||||||
"staging/src/k8s.io/kms/apis"
|
|
||||||
"staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2"
|
|
||||||
|
|
||||||
"staging/src/k8s.io/kubelet/pkg/apis/dra"
|
|
||||||
|
|
||||||
"staging/src/k8s.io/kubelet/pkg/apis/pluginregistration"
|
|
||||||
"pkg/kubelet/pluginmanager/pluginwatcher/example_plugin_apis"
|
|
||||||
)
|
|
||||||
|
|
||||||
for api in "${APIS[@]}"; do
|
|
||||||
# This can't use `git ls-files` because it runs in a container without the
|
# This can't use `git ls-files` because it runs in a container without the
|
||||||
# .git dir synced.
|
# .git dir synced.
|
||||||
find "${api}" -type f -name "api.proto" \
|
find "${api}" -type f -name "api.proto" \
|
||||||
|
Loading…
Reference in New Issue
Block a user