From a88d25f9ad5aea6f2574739dfbe6458add0e62f0 Mon Sep 17 00:00:00 2001 From: Di Xu Date: Wed, 5 Feb 2020 10:36:52 +0800 Subject: [PATCH] not walking directory if KUBE_BUILD_PLATFORMS is given --- build/lib/release.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build/lib/release.sh b/build/lib/release.sh index ac420f62159..56da7a1c7bf 100644 --- a/build/lib/release.sh +++ b/build/lib/release.sh @@ -125,8 +125,13 @@ function kube::release::package_src_tarball() { # Package up all of the cross compiled clients. Over time this should grow into # a full SDK function kube::release::package_client_tarballs() { - # Find all of the built client binaries - for platform_long in "${LOCAL_OUTPUT_BINPATH}"/*/*; do + # Find all of the built client binaries + local long_platforms=("${LOCAL_OUTPUT_BINPATH}"/*/*) + if [[ -n ${KUBE_BUILD_PLATFORMS-} ]]; then + read -ra long_platforms <<< "${KUBE_BUILD_PLATFORMS}" + fi + + for platform_long in "${long_platforms[@]}"; do local platform local platform_tag platform=${platform_long##${LOCAL_OUTPUT_BINPATH}/} # Strip LOCAL_OUTPUT_BINPATH