From fda1c272e95912c095dd60d18ddb813794583880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ma=CC=88der?= Date: Thu, 7 Feb 2019 09:34:24 +0100 Subject: [PATCH] fix DEBUG --- build-latest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-latest.sh b/build-latest.sh index c607fc9..66594cb 100755 --- a/build-latest.sh +++ b/build-latest.sh @@ -55,7 +55,7 @@ BEARER_TOKEN="$($CURL "${URL_DOCKERHUB_TOKEN}" | jq -r .token)" URL_DOCKERHUB_TAG="https://registry.hub.docker.com/v2/${DOCKERHUB_REPO}/tags/list" AUTHORIZATION_HEADER="Authorization: Bearer ${BEARER_TOKEN}" -if [ -z "$VARIANT" ]; then +if [ -z "$VARIANT" ] || [ "$VARIANT" == "main" ]; then DOCKER_TAG="${VERSION}" else DOCKER_TAG="${VERSION}-${VARIANT}" @@ -63,7 +63,7 @@ fi ALREADY_BUILT="$($CURL -H "${AUTHORIZATION_HEADER}" "${URL_DOCKERHUB_TAG}" | jq -e ".tags | any(.==\"${DOCKER_TAG}\")")" -if [ -n "$DEBUG" ] && [ "$ALREADY_BUILT" == "false" ]; then +if [ -n "$DEBUG" ] || [ "$ALREADY_BUILT" == "false" ]; then if [ -n "$DEBUG" ]; then echo "⚠️ Would not build, because ${DOCKER_TAG} already exists on https://hub.docker.com/r/${DOCKERHUB_REPO}, but DEBUG is enabled." fi