Skip to content

Commit e05f8e6

Browse files
committed
Re-adding the [[ as per review comment request
Change-Id: I4a2fa687e6ef5c4ebf5c5624a730c32f23b7b134 Signed-off-by: Joakim Roubert <[email protected]>
1 parent b1d0277 commit e05f8e6

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

build/lib/release.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function kube::release::package_tarballs() {
108108
function kube::release::package_src_tarball() {
109109
local -r src_tarball="${RELEASE_TARS}/kubernetes-src.tar.gz"
110110
kube::log::status "Building tarball: src"
111-
if [ "${KUBE_GIT_TREE_STATE-}" = 'clean' ]; then
111+
if [[ "${KUBE_GIT_TREE_STATE-}" = 'clean' ]]; then
112112
git archive -o "${src_tarball}" HEAD
113113
else
114114
find "${KUBE_ROOT}" -mindepth 1 -maxdepth 1 \
@@ -140,7 +140,7 @@ function kube::release::package_client_tarballs() {
140140
mkdir -p "${release_stage}/client/bin"
141141

142142
local client_bins=("${KUBE_CLIENT_BINARIES[@]}")
143-
if [ "${platform%/*}" = 'windows' ]; then
143+
if [[ "${platform%/*}" = 'windows' ]]; then
144144
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
145145
fi
146146

@@ -176,7 +176,7 @@ function kube::release::package_node_tarballs() {
176176
mkdir -p "${release_stage}/node/bin"
177177

178178
local node_bins=("${KUBE_NODE_BINARIES[@]}")
179-
if [ "${platform%/*}" = 'windows' ]; then
179+
if [[ "${platform%/*}" = 'windows' ]]; then
180180
node_bins=("${KUBE_NODE_BINARIES_WIN[@]}")
181181
fi
182182
# This fancy expression will expand to prepend a path
@@ -190,7 +190,7 @@ function kube::release::package_node_tarballs() {
190190

191191
# Include the client binaries here too as they are useful debugging tools.
192192
local client_bins=("${KUBE_CLIENT_BINARIES[@]}")
193-
if [ "${platform%/*}" = 'windows' ]; then
193+
if [[ "${platform%/*}" = 'windows' ]]; then
194194
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
195195
fi
196196
# This fancy expression will expand to prepend a path
@@ -262,7 +262,7 @@ function kube::release::package_server_tarballs() {
262262
# Include the client binaries here too as they are useful debugging tools.
263263
local client_bins
264264
client_bins=("${KUBE_CLIENT_BINARIES[@]}")
265-
if [ "${platform%/*}" = 'windows' ]; then
265+
if [[ "${platform%/*}" = 'windows' ]]; then
266266
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
267267
fi
268268
# This fancy expression will expand to prepend a path
@@ -310,7 +310,7 @@ function kube::release::build_hyperkube_image() {
310310

311311
local hyperkube_tag
312312
hyperkube_tag="${registry}/hyperkube-${arch}:${version}"
313-
if [ -n "${save_dir}" ]; then
313+
if [[ -n "${save_dir}" ]]; then
314314
"${DOCKER[@]}" save "${hyperkube_tag}" > "${save_dir}/hyperkube-${arch}.tar"
315315
fi
316316
kube::log::status "Deleting hyperkube image ${hyperkube_tag}"
@@ -328,7 +328,7 @@ function kube::release::build_conformance_image() {
328328

329329
local conformance_tag
330330
conformance_tag="${registry}/conformance-${arch}:${version}"
331-
if [ -n "${save_dir}" ]; then
331+
if [[ -n "${save_dir}" ]]; then
332332
"${DOCKER[@]}" save "${conformance_tag}" > "${save_dir}/conformance-${arch}.tar"
333333
fi
334334
kube::log::status "Deleting conformance image ${conformance_tag}"
@@ -358,7 +358,7 @@ function kube::release::create_docker_images_for_server() {
358358
local -r docker_registry="k8s.gcr.io"
359359
# Docker tags cannot contain '+'
360360
local docker_tag="${KUBE_GIT_VERSION/+/_}"
361-
if [ -z "${docker_tag}" ]; then
361+
if [[ -z "${docker_tag}" ]]; then
362362
kube::log::error "git version information missing; cannot create Docker tag"
363363
return 1
364364
fi
@@ -401,7 +401,7 @@ EOF
401401
# If we are building an official/alpha/beta release we want to keep
402402
# docker images and tag them appropriately.
403403
local -r release_docker_image_tag="${KUBE_DOCKER_REGISTRY-$docker_registry}/${binary_name}-${arch}:${KUBE_DOCKER_IMAGE_TAG-$docker_tag}"
404-
if [ "${release_docker_image_tag}" != "${docker_image_tag}" ]; then
404+
if [[ "${release_docker_image_tag}" != "${docker_image_tag}" ]]; then
405405
kube::log::status "Tagging docker image ${docker_image_tag} as ${release_docker_image_tag}"
406406
"${DOCKER[@]}" rmi "${release_docker_image_tag}" 2>/dev/null || true
407407
"${DOCKER[@]}" tag "${docker_image_tag}" "${release_docker_image_tag}" 2>/dev/null
@@ -456,7 +456,7 @@ function kube::release::package_kube_manifests_tarball() {
456456
find "${src_dir}" -name 'internal-*' -exec cp {} "${dst_dir}" \;
457457
cp "${KUBE_ROOT}/cluster/gce/gci/configure-helper.sh" "${dst_dir}/gci-configure-helper.sh"
458458
cp "${KUBE_ROOT}/cluster/gce/gci/configure-kubeapiserver.sh" "${dst_dir}/configure-kubeapiserver.sh"
459-
if [ -e "${KUBE_ROOT}/cluster/gce/gci/gke-internal-configure-helper.sh" ]; then
459+
if [[ -e "${KUBE_ROOT}/cluster/gce/gci/gke-internal-configure-helper.sh" ]]; then
460460
cp "${KUBE_ROOT}/cluster/gce/gci/gke-internal-configure-helper.sh" "${dst_dir}/"
461461
fi
462462
cp "${KUBE_ROOT}/cluster/gce/gci/health-monitor.sh" "${dst_dir}/health-monitor.sh"
@@ -495,7 +495,7 @@ function kube::release::package_test_platform_tarballs() {
495495
mkdir -p "${release_stage}/test/bin"
496496

497497
local test_bins=("${KUBE_TEST_BINARIES[@]}")
498-
if [ "${platform%/*}" = 'windows' ]; then
498+
if [[ "${platform%/*}" = 'windows' ]]; then
499499
test_bins=("${KUBE_TEST_BINARIES_WIN[@]}")
500500
fi
501501
# This fancy expression will expand to prepend a path

0 commit comments

Comments
 (0)