mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
hack/lib/util.sh: improve staging api finding.
Do not bother with pushd/popd construct -- there is no need to go back to original directory in a subshell. Use "find --exec" instead of "find | xargs" to handle special file names better.
This commit is contained in:
parent
39f4763afe
commit
4a82a011a0
@ -244,11 +244,9 @@ kube::util::remove-gen-docs() {
|
||||
kube::util::group-version-to-pkg-path() {
|
||||
staging_apis=(
|
||||
$(
|
||||
pushd ${KUBE_ROOT}/staging/src/k8s.io/api > /dev/null
|
||||
find . -name types.go | xargs -n1 dirname | sed "s|\./||g" | sort
|
||||
popd > /dev/null
|
||||
)
|
||||
)
|
||||
cd "${KUBE_ROOT}/staging/src/k8s.io/api" &&
|
||||
find . -name types.go -exec dirname {} \; | sed "s|\./||g" | sort
|
||||
))
|
||||
|
||||
local group_version="$1"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user