mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
clean up unused vars in codegen scripts
This commit is contained in:
parent
a2c200a57a
commit
cabe69faeb
@ -40,7 +40,6 @@ informergen=$(kube::util::find-binary "informer-gen")
|
|||||||
|
|
||||||
GROUP_VERSIONS=(${KUBE_AVAILABLE_GROUP_VERSIONS})
|
GROUP_VERSIONS=(${KUBE_AVAILABLE_GROUP_VERSIONS})
|
||||||
GV_DIRS=()
|
GV_DIRS=()
|
||||||
INTERNAL_DIRS=()
|
|
||||||
for gv in "${GROUP_VERSIONS[@]}"; do
|
for gv in "${GROUP_VERSIONS[@]}"; do
|
||||||
# add items, but strip off any leading apis/ you find to match command expectations
|
# add items, but strip off any leading apis/ you find to match command expectations
|
||||||
api_dir=$(kube::util::group-version-to-pkg-path "${gv}")
|
api_dir=$(kube::util::group-version-to-pkg-path "${gv}")
|
||||||
@ -55,19 +54,9 @@ for gv in "${GROUP_VERSIONS[@]}"; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
GV_DIRS+=("${pkg_dir}")
|
GV_DIRS+=("${pkg_dir}")
|
||||||
|
|
||||||
# collect internal groups
|
|
||||||
int_group="${pkg_dir%/*}/"
|
|
||||||
if [[ "${pkg_dir}" = core/* ]]; then
|
|
||||||
int_group="api/"
|
|
||||||
fi
|
|
||||||
if ! [[ " ${INTERNAL_DIRS[@]:-} " =~ " ${int_group} " ]]; then
|
|
||||||
INTERNAL_DIRS+=("${int_group}")
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
# delimit by commas for the command
|
# delimit by commas for the command
|
||||||
GV_DIRS_CSV=$(IFS=',';echo "${GV_DIRS[*]// /,}";IFS=$)
|
GV_DIRS_CSV=$(IFS=',';echo "${GV_DIRS[*]// /,}";IFS=$)
|
||||||
INTERNAL_DIRS_CSV=$(IFS=',';echo "${INTERNAL_DIRS[*]// /,}";IFS=$)
|
|
||||||
|
|
||||||
# This can be called with one flag, --verify-only, so it works for both the
|
# This can be called with one flag, --verify-only, so it works for both the
|
||||||
# update- and verify- scripts.
|
# update- and verify- scripts.
|
||||||
|
Loading…
Reference in New Issue
Block a user