diff --git a/quickstart/docker/pushLatestDocker.sh b/quickstart/docker/pushLatestDocker.sh index a1ef148b0..1d60c40fd 100755 --- a/quickstart/docker/pushLatestDocker.sh +++ b/quickstart/docker/pushLatestDocker.sh @@ -1,17 +1,21 @@ #!/usr/bin/env bash -set -eo pipefail + +set -o errexit +set -o nounset +set -o pipefail +# set -o xtrace SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -: "${ZITI_QUICKSTART_IMAGE:-openziti/quickstart}" +: "${ZITI_QUICKSTART_IMAGE:=openziti/quickstart}" -if [ -z "${ZITI_VERSION}" ]; then +if [ -z "${ZITI_VERSION:-}" ]; then DOCKER_IMAGE_ROOT="$(realpath ${SCRIPT_DIR}/image)" v=$(source "${DOCKER_IMAGE_ROOT}/ziti-cli-functions.sh"; getLatestZitiVersion > /dev/null 2>&1; echo ${ZITI_BINARIES_VERSION}) ZITI_VERSION=$(echo "${v}" | sed -e 's/^v//') echo "ZITI_VERSION=${ZITI_VERSION}" fi -if [ -z "${ZITI_VERSION}" ]; then +if [ -z "${ZITI_VERSION:-}" ]; then echo "ZITI_VERSION was not set and auto-detection failed." exit 1 fi @@ -22,7 +26,7 @@ if [ -z "${IMAGE_TAG}" ]; then echo "image tag name was not provided, using default '${IMAGE_TAG}'" fi -if [ "local" == "${1}" ]; then +if [ "local" == "${1-}" ]; then echo "LOADING LOCALLY instead of pushing to dockerhub" _BUILDX_PLATFORM="" _BUILDX_ACTION="--load"