diff --git a/scripts/larvatagger.sh b/scripts/larvatagger.sh index f3921852dbb230e0bd94e4ac7947187c8de4240f..52e624d5b95b76373ebe22923a0a05064efce864 100755 --- a/scripts/larvatagger.sh +++ b/scripts/larvatagger.sh @@ -22,6 +22,10 @@ for _ in $(seq $#); do shift ;; *) + if [ "$1" = "--no-cache" ]; then + # --no-cache is default for build since 0.16.1 + no_cache=1 + fi # note: if DOCKER_ARGS is externally defined, it must end with an explicit space DOCKER_ARGS="${DOCKER_ARGS}$1 " shift @@ -78,12 +82,15 @@ DOCKER_ARGS="--build-arg BACKEND=${1:15} $DOCKER_ARGS"; shift TARGET=backend elif [ "$1" = "--no-cache" ]; then echo "Deprecation warning: argument $1 should now be passed before build" -DOCKER_ARGS="--no-cache $DOCKER_ARGS"; shift +shift else echo "argument not supported: $1"; shift exit 1 fi done +if [ -z "$no_cache" ]; then + DOCKER_ARGS="--no-cache $DOCKER_ARGS" +fi DOCKER_ARGS="--target $TARGET $DOCKER_ARGS" if [ "$BUILD" == "--dev" ]; then if ! [[ "$LARVATAGGER_IMAGE" == *:* ]]; then LARVATAGGER_IMAGE="${LARVATAGGER_IMAGE}:dev"; fi