Skip to content

Commit 468611d

Browse files
committed
Update after review comments
Signed-off-by: Joakim Roubert <[email protected]>
1 parent 405609b commit 468611d

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

build/lib/release.sh

Lines changed: 13 additions & 13 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
"${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() {
138138
mkdir -p "${release_stage}/client/bin"
139139

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

@@ -174,7 +174,7 @@ function kube::release::package_node_tarballs() {
174174
mkdir -p "${release_stage}/node/bin"
175175

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

189189
# Include the client binaries here too as they are useful debugging tools.
190190
local client_bins=("${KUBE_CLIENT_BINARIES[@]}")
191-
if [[ "${platform%/*}" == "windows" ]]; then
191+
if [ "${platform%/*}" = 'windows' ]; then
192192
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
193193
fi
194194
# This fancy expression will expand to prepend a path
@@ -260,7 +260,7 @@ function kube::release::package_server_tarballs() {
260260
# Include the client binaries here too as they are useful debugging tools.
261261
local client_bins
262262
client_bins=("${KUBE_CLIENT_BINARIES[@]}")
263-
if [[ "${platform%/*}" == "windows" ]]; then
263+
if [ "${platform%/*}" = 'windows' ]; then
264264
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
265265
fi
266266
# This fancy expression will expand to prepend a path
@@ -308,7 +308,7 @@ function kube::release::build_hyperkube_image() {
308308

309309
local hyperkube_tag
310310
hyperkube_tag="${registry}/hyperkube-${arch}:${version}"
311-
if [[ -n "${save_dir}" ]]; then
311+
if [ -n "${save_dir}" ]; then
312312
"${DOCKER[@]}" save "${hyperkube_tag}" > "${save_dir}/hyperkube-${arch}.tar"
313313
fi
314314
kube::log::status "Deleting hyperkube image ${hyperkube_tag}"
@@ -326,7 +326,7 @@ function kube::release::build_conformance_image() {
326326

327327
local conformance_tag
328328
conformance_tag="${registry}/conformance-${arch}:${version}"
329-
if [[ -n "${save_dir}" ]]; then
329+
if [ -n "${save_dir}" ]; then
330330
"${DOCKER[@]}" save "${conformance_tag}" > "${save_dir}/conformance-${arch}.tar"
331331
fi
332332
kube::log::status "Deleting conformance image ${conformance_tag}"
@@ -357,7 +357,7 @@ function kube::release::create_docker_images_for_server() {
357357
local -r docker_registry="k8s.gcr.io"
358358
# Docker tags cannot contain '+'
359359
local docker_tag="${KUBE_GIT_VERSION/+/_}"
360-
if [[ -z "${docker_tag}" ]]; then
360+
if [ -z "${docker_tag}" ]; then
361361
kube::log::error "git version information missing; cannot create Docker tag"
362362
return 1
363363
fi
@@ -401,11 +401,11 @@ EOF
401401
echo "COPY nsswitch.conf /etc/" >> "${docker_file_path}"
402402
fi
403403

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
405405
# If we are building an official/alpha/beta release we want to keep
406406
# docker images and tag them appropriately.
407407
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
409409
kube::log::status "Tagging docker image ${docker_image_tag} as ${release_docker_image_tag}"
410410
"${DOCKER[@]}" rmi "${release_docker_image_tag}" 2>/dev/null || true
411411
"${DOCKER[@]}" tag "${docker_image_tag}" "${release_docker_image_tag}" 2>/dev/null
@@ -463,7 +463,7 @@ function kube::release::package_kube_manifests_tarball() {
463463
done
464464
cp "${KUBE_ROOT}/cluster/gce/gci/configure-helper.sh" "${dst_dir}/gci-configure-helper.sh"
465465
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
467467
cp "${KUBE_ROOT}/cluster/gce/gci/gke-internal-configure-helper.sh" "${dst_dir}/"
468468
fi
469469
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() {
473473
# Merge GCE-specific addons with general purpose addons.
474474
local gce_objects
475475
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
477477
tar c -C "${KUBE_ROOT}/cluster/gce/addons" "${gce_objects}" | tar x -C "${dst_dir}"
478478
fi
479479

@@ -507,7 +507,7 @@ function kube::release::package_test_platform_tarballs() {
507507
mkdir -p "${release_stage}/test/bin"
508508

509509
local test_bins=("${KUBE_TEST_BINARIES[@]}")
510-
if [[ "${platform%/*}" == "windows" ]]; then
510+
if [ "${platform%/*}" = 'windows' ]; then
511511
test_bins=("${KUBE_TEST_BINARIES_WIN[@]}")
512512
fi
513513
# This fancy expression will expand to prepend a path

0 commit comments

Comments
 (0)