@@ -112,7 +112,7 @@ function kube::release::package_src_tarball() {
112
112
git archive -o " ${src_tarball} " HEAD
113
113
else
114
114
find " ${KUBE_ROOT} " -mindepth 1 -maxdepth 1 \
115
- -not \( \
115
+ ! \( \
116
116
\( -path " ${KUBE_ROOT} " /_\* -o \
117
117
-path " ${KUBE_ROOT} " /.git\* -o \
118
118
-path " ${KUBE_ROOT} " /.config\* -o \
@@ -348,7 +348,6 @@ function kube::release::create_docker_images_for_server() {
348
348
local images_dir
349
349
binary_dir=" $1 "
350
350
arch=" $2 "
351
- binary_name
352
351
binaries=$( kube::build::get_docker_wrapped_binaries " ${arch} " )
353
352
images_dir=" ${RELEASE_IMAGES} /${arch} "
354
353
mkdir -p " ${images_dir} "
@@ -466,15 +465,10 @@ function kube::release::package_kube_manifests_tarball() {
466
465
cp " ${KUBE_ROOT} /cluster/gce/gci/gke-internal-configure-helper.sh" " ${dst_dir} /"
467
466
fi
468
467
cp " ${KUBE_ROOT} /cluster/gce/gci/health-monitor.sh" " ${dst_dir} /health-monitor.sh"
469
- local objects
470
- objects=$( cd " ${KUBE_ROOT} /cluster/addons" && find . \( -name \* .yaml -or -name \* .yaml.in -or -name \* .json \) | grep -v demo)
471
- tar c -C " ${KUBE_ROOT} /cluster/addons" " ${objects} " | tar x -C " ${dst_dir} "
472
468
# Merge GCE-specific addons with general purpose addons.
473
- local gce_objects
474
- gce_objects=$( cd " ${KUBE_ROOT} /cluster/gce/addons" && find . \( -name \* .yaml -or -name \* .yaml.in -or -name \* .json \) \( -not -name \* demo\* \) )
475
- if [[ -n ${gce_objects} ]]; then
476
- tar c -C " ${KUBE_ROOT} /cluster/gce/addons" " ${gce_objects} " | tar x -C " ${dst_dir} "
477
- fi
469
+ for d in cluster/addons cluster/gce/addons; do
470
+ find " ${KUBE_ROOT} /${d} " \( \( -name \* .yaml -o -name \* .yaml.in -o -name \* .json \) -a ! \( -name \* demo\* \) \) -print0 | tar c --transform " s|${KUBE_ROOT#/* } /${d} ||" --null -T - | " ${TAR} " x -C " ${dst_dir} "
471
+ done
478
472
479
473
kube::release::clean_cruft
480
474
0 commit comments