Skip to content

Commit

Permalink
Re-adding the [[ as per review comment request
Browse files Browse the repository at this point in the history
Change-Id: I4a2fa687e6ef5c4ebf5c5624a730c32f23b7b134
Signed-off-by: Joakim Roubert <[email protected]>
  • Loading branch information
joakimr-axis committed Feb 6, 2020
1 parent b1d0277 commit e05f8e6
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions build/lib/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function kube::release::package_tarballs() {
function kube::release::package_src_tarball() {
local -r src_tarball="${RELEASE_TARS}/kubernetes-src.tar.gz"
kube::log::status "Building tarball: src"
if [ "${KUBE_GIT_TREE_STATE-}" = 'clean' ]; then
if [[ "${KUBE_GIT_TREE_STATE-}" = 'clean' ]]; then
git archive -o "${src_tarball}" HEAD
else
find "${KUBE_ROOT}" -mindepth 1 -maxdepth 1 \
Expand Down Expand Up @@ -140,7 +140,7 @@ function kube::release::package_client_tarballs() {
mkdir -p "${release_stage}/client/bin"

local client_bins=("${KUBE_CLIENT_BINARIES[@]}")
if [ "${platform%/*}" = 'windows' ]; then
if [[ "${platform%/*}" = 'windows' ]]; then
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
fi

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

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

# Include the client binaries here too as they are useful debugging tools.
local client_bins=("${KUBE_CLIENT_BINARIES[@]}")
if [ "${platform%/*}" = 'windows' ]; then
if [[ "${platform%/*}" = 'windows' ]]; then
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
fi
# This fancy expression will expand to prepend a path
Expand Down Expand Up @@ -262,7 +262,7 @@ function kube::release::package_server_tarballs() {
# Include the client binaries here too as they are useful debugging tools.
local client_bins
client_bins=("${KUBE_CLIENT_BINARIES[@]}")
if [ "${platform%/*}" = 'windows' ]; then
if [[ "${platform%/*}" = 'windows' ]]; then
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
fi
# This fancy expression will expand to prepend a path
Expand Down Expand Up @@ -310,7 +310,7 @@ function kube::release::build_hyperkube_image() {

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

local conformance_tag
conformance_tag="${registry}/conformance-${arch}:${version}"
if [ -n "${save_dir}" ]; then
if [[ -n "${save_dir}" ]]; then
"${DOCKER[@]}" save "${conformance_tag}" > "${save_dir}/conformance-${arch}.tar"
fi
kube::log::status "Deleting conformance image ${conformance_tag}"
Expand Down Expand Up @@ -358,7 +358,7 @@ function kube::release::create_docker_images_for_server() {
local -r docker_registry="k8s.gcr.io"
# Docker tags cannot contain '+'
local docker_tag="${KUBE_GIT_VERSION/+/_}"
if [ -z "${docker_tag}" ]; then
if [[ -z "${docker_tag}" ]]; then
kube::log::error "git version information missing; cannot create Docker tag"
return 1
fi
Expand Down Expand Up @@ -401,7 +401,7 @@ EOF
# If we are building an official/alpha/beta release we want to keep
# docker images and tag them appropriately.
local -r release_docker_image_tag="${KUBE_DOCKER_REGISTRY-$docker_registry}/${binary_name}-${arch}:${KUBE_DOCKER_IMAGE_TAG-$docker_tag}"
if [ "${release_docker_image_tag}" != "${docker_image_tag}" ]; then
if [[ "${release_docker_image_tag}" != "${docker_image_tag}" ]]; then
kube::log::status "Tagging docker image ${docker_image_tag} as ${release_docker_image_tag}"
"${DOCKER[@]}" rmi "${release_docker_image_tag}" 2>/dev/null || true
"${DOCKER[@]}" tag "${docker_image_tag}" "${release_docker_image_tag}" 2>/dev/null
Expand Down Expand Up @@ -456,7 +456,7 @@ function kube::release::package_kube_manifests_tarball() {
find "${src_dir}" -name 'internal-*' -exec cp {} "${dst_dir}" \;
cp "${KUBE_ROOT}/cluster/gce/gci/configure-helper.sh" "${dst_dir}/gci-configure-helper.sh"
cp "${KUBE_ROOT}/cluster/gce/gci/configure-kubeapiserver.sh" "${dst_dir}/configure-kubeapiserver.sh"
if [ -e "${KUBE_ROOT}/cluster/gce/gci/gke-internal-configure-helper.sh" ]; then
if [[ -e "${KUBE_ROOT}/cluster/gce/gci/gke-internal-configure-helper.sh" ]]; then
cp "${KUBE_ROOT}/cluster/gce/gci/gke-internal-configure-helper.sh" "${dst_dir}/"
fi
cp "${KUBE_ROOT}/cluster/gce/gci/health-monitor.sh" "${dst_dir}/health-monitor.sh"
Expand Down Expand Up @@ -495,7 +495,7 @@ function kube::release::package_test_platform_tarballs() {
mkdir -p "${release_stage}/test/bin"

local test_bins=("${KUBE_TEST_BINARIES[@]}")
if [ "${platform%/*}" = 'windows' ]; then
if [[ "${platform%/*}" = 'windows' ]]; then
test_bins=("${KUBE_TEST_BINARIES_WIN[@]}")
fi
# This fancy expression will expand to prepend a path
Expand Down

0 comments on commit e05f8e6

Please sign in to comment.