@@ -108,7 +108,7 @@ function kube::release::package_tarballs() {
108
108
function kube::release::package_src_tarball() {
109
109
local -r src_tarball=" ${RELEASE_TARS} /kubernetes-src.tar.gz"
110
110
kube::log::status " Building tarball: src"
111
- if [[ " ${KUBE_GIT_TREE_STATE-} " == " clean" ] ]; then
111
+ if [ " ${KUBE_GIT_TREE_STATE-} " = ' clean' ]; then
112
112
git archive -o " ${src_tarball} " HEAD
113
113
else
114
114
" ${TAR} " czf " ${src_tarball} " --transform ' s|^\.|kubernetes|' -C " ${KUBE_ROOT} " " $( cd " ${KUBE_ROOT} " && find . -mindepth 1 -maxdepth 1 \
@@ -138,7 +138,7 @@ function kube::release::package_client_tarballs() {
138
138
mkdir -p " ${release_stage} /client/bin"
139
139
140
140
local client_bins=(" ${KUBE_CLIENT_BINARIES[@]} " )
141
- if [[ " ${platform%/* } " == " windows" ] ]; then
141
+ if [ " ${platform%/* } " = ' windows' ]; then
142
142
client_bins=(" ${KUBE_CLIENT_BINARIES_WIN[@]} " )
143
143
fi
144
144
@@ -174,7 +174,7 @@ function kube::release::package_node_tarballs() {
174
174
mkdir -p " ${release_stage} /node/bin"
175
175
176
176
local node_bins=(" ${KUBE_NODE_BINARIES[@]} " )
177
- if [[ " ${platform%/* } " == " windows" ] ]; then
177
+ if [ " ${platform%/* } " = ' windows' ]; then
178
178
node_bins=(" ${KUBE_NODE_BINARIES_WIN[@]} " )
179
179
fi
180
180
# This fancy expression will expand to prepend a path
@@ -188,7 +188,7 @@ function kube::release::package_node_tarballs() {
188
188
189
189
# Include the client binaries here too as they are useful debugging tools.
190
190
local client_bins=(" ${KUBE_CLIENT_BINARIES[@]} " )
191
- if [[ " ${platform%/* } " == " windows" ] ]; then
191
+ if [ " ${platform%/* } " = ' windows' ]; then
192
192
client_bins=(" ${KUBE_CLIENT_BINARIES_WIN[@]} " )
193
193
fi
194
194
# This fancy expression will expand to prepend a path
@@ -260,7 +260,7 @@ function kube::release::package_server_tarballs() {
260
260
# Include the client binaries here too as they are useful debugging tools.
261
261
local client_bins
262
262
client_bins=(" ${KUBE_CLIENT_BINARIES[@]} " )
263
- if [[ " ${platform%/* } " == " windows" ] ]; then
263
+ if [ " ${platform%/* } " = ' windows' ]; then
264
264
client_bins=(" ${KUBE_CLIENT_BINARIES_WIN[@]} " )
265
265
fi
266
266
# This fancy expression will expand to prepend a path
@@ -308,7 +308,7 @@ function kube::release::build_hyperkube_image() {
308
308
309
309
local hyperkube_tag
310
310
hyperkube_tag=" ${registry} /hyperkube-${arch} :${version} "
311
- if [[ -n " ${save_dir} " ] ]; then
311
+ if [ -n " ${save_dir} " ]; then
312
312
" ${DOCKER[@]} " save " ${hyperkube_tag} " > " ${save_dir} /hyperkube-${arch} .tar"
313
313
fi
314
314
kube::log::status " Deleting hyperkube image ${hyperkube_tag} "
@@ -326,7 +326,7 @@ function kube::release::build_conformance_image() {
326
326
327
327
local conformance_tag
328
328
conformance_tag=" ${registry} /conformance-${arch} :${version} "
329
- if [[ -n " ${save_dir} " ] ]; then
329
+ if [ -n " ${save_dir} " ]; then
330
330
" ${DOCKER[@]} " save " ${conformance_tag} " > " ${save_dir} /conformance-${arch} .tar"
331
331
fi
332
332
kube::log::status " Deleting conformance image ${conformance_tag} "
@@ -357,7 +357,7 @@ function kube::release::create_docker_images_for_server() {
357
357
local -r docker_registry=" k8s.gcr.io"
358
358
# Docker tags cannot contain '+'
359
359
local docker_tag=" ${KUBE_GIT_VERSION/ +/ _} "
360
- if [[ -z " ${docker_tag} " ] ]; then
360
+ if [ -z " ${docker_tag} " ]; then
361
361
kube::log::error " git version information missing; cannot create Docker tag"
362
362
return 1
363
363
fi
@@ -401,11 +401,11 @@ EOF
401
401
echo " COPY nsswitch.conf /etc/" >> " ${docker_file_path} "
402
402
fi
403
403
404
- " ${DOCKER[@]} " build " ${docker_build_opts} " -q -t " ${docker_image_tag} " " ${docker_build_path} " > /dev/null
404
+ " ${DOCKER[@]} " build ${docker_build_opts : + " ${docker_build_opts} " } -q -t " ${docker_image_tag} " " ${docker_build_path} " > /dev/null
405
405
# If we are building an official/alpha/beta release we want to keep
406
406
# docker images and tag them appropriately.
407
407
local -r release_docker_image_tag=" ${KUBE_DOCKER_REGISTRY-$docker_registry } /${binary_name} -${arch} :${KUBE_DOCKER_IMAGE_TAG-$docker_tag } "
408
- if [[ " ${release_docker_image_tag} " != " ${docker_image_tag} " ] ]; then
408
+ if [ " ${release_docker_image_tag} " != " ${docker_image_tag} " ]; then
409
409
kube::log::status " Tagging docker image ${docker_image_tag} as ${release_docker_image_tag} "
410
410
" ${DOCKER[@]} " rmi " ${release_docker_image_tag} " 2> /dev/null || true
411
411
" ${DOCKER[@]} " tag " ${docker_image_tag} " " ${release_docker_image_tag} " 2> /dev/null
@@ -463,7 +463,7 @@ function kube::release::package_kube_manifests_tarball() {
463
463
done
464
464
cp " ${KUBE_ROOT} /cluster/gce/gci/configure-helper.sh" " ${dst_dir} /gci-configure-helper.sh"
465
465
cp " ${KUBE_ROOT} /cluster/gce/gci/configure-kubeapiserver.sh" " ${dst_dir} /configure-kubeapiserver.sh"
466
- if [[ -e " ${KUBE_ROOT} /cluster/gce/gci/gke-internal-configure-helper.sh" ] ]; then
466
+ if [ -e " ${KUBE_ROOT} /cluster/gce/gci/gke-internal-configure-helper.sh" ]; then
467
467
cp " ${KUBE_ROOT} /cluster/gce/gci/gke-internal-configure-helper.sh" " ${dst_dir} /"
468
468
fi
469
469
cp " ${KUBE_ROOT} /cluster/gce/gci/health-monitor.sh" " ${dst_dir} /health-monitor.sh"
@@ -473,7 +473,7 @@ function kube::release::package_kube_manifests_tarball() {
473
473
# Merge GCE-specific addons with general purpose addons.
474
474
local gce_objects
475
475
gce_objects=$( cd " ${KUBE_ROOT} /cluster/gce/addons" && find . \( -name \* .yaml -or -name \* .yaml.in -or -name \* .json \) \( -not -name \* demo\* \) )
476
- if [[ -n " ${gce_objects} " ] ]; then
476
+ if [ -n " ${gce_objects} " ]; then
477
477
tar c -C " ${KUBE_ROOT} /cluster/gce/addons" " ${gce_objects} " | tar x -C " ${dst_dir} "
478
478
fi
479
479
@@ -507,7 +507,7 @@ function kube::release::package_test_platform_tarballs() {
507
507
mkdir -p " ${release_stage} /test/bin"
508
508
509
509
local test_bins=(" ${KUBE_TEST_BINARIES[@]} " )
510
- if [[ " ${platform%/* } " == " windows" ] ]; then
510
+ if [ " ${platform%/* } " = ' windows' ]; then
511
511
test_bins=(" ${KUBE_TEST_BINARIES_WIN[@]} " )
512
512
fi
513
513
# This fancy expression will expand to prepend a path
0 commit comments