From 747b32adb2b1fd2f19cc0a1a2c06973872a08413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ma=CC=88der?= Date: Mon, 5 Mar 2018 16:29:02 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Fix=20parameter=20passing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/build.sh b/build.sh index 9133d19..d01039a 100755 --- a/build.sh +++ b/build.sh @@ -76,14 +76,6 @@ case "${BRANCH}" in esac DOCKER_TAG="${DOCKER_TAG-${DOCKER_ORG}/${DOCKER_REPO}:${TAG}}" -# caching is only ok for version tags -case "${TAG}" in - v*) - CACHE="${CACHE-}";; - *) - CACHE="${CACHE---no-cache}";; -esac - # Checking which VARIANT to build if [ -z "$VARIANT" ]; then DOCKERFILE="Dockerfile" @@ -103,11 +95,15 @@ else fi fi -# Docker options -DOCKER_OPTS=( - "$CACHE" - --pull -) +DOCKER_OPTS=("${DOCKER_OPTS[@]}") + +# caching is only ok for version tags +case "${TAG}" in + v*) ;; + *) DOCKER_OPTS+=( "--no-cache" ) ;; +esac + +DOCKER_OPTS+=( "--pull" ) # Build args DOCKER_BUILD_ARGS=(