From 0c88dcf46389b2d452f262df951cb8c581549440 Mon Sep 17 00:00:00 2001 From: Nanne Baars Date: Wed, 18 Oct 2017 21:08:59 +0200 Subject: [PATCH] Bug when passing version to Docker (v8.0 should be 8.0) --- scripts/deploy-webgoat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/deploy-webgoat.sh b/scripts/deploy-webgoat.sh index 02586b942..0308640bb 100644 --- a/scripts/deploy-webgoat.sh +++ b/scripts/deploy-webgoat.sh @@ -7,11 +7,11 @@ cd webgoat-server if [ "${BRANCH}" == "master" ] && [ ! -z "${TRAVIS_TAG}" ]; then # If we push a tag to master this will update the LATEST Docker image and tag with the version number - docker build --build-arg webgoat_version=${TRAVIS_TAG} -f Dockerfile -t $REPO:latest -t $REPO:${TRAVIS_TAG} . + docker build --build-arg webgoat_version=${TRAVIS_TAG:1} -f Dockerfile -t $REPO:latest -t $REPO:${TRAVIS_TAG} . docker push $REPO elif [ ! -z "${TRAVIS_TAG}" ]; then # Creating a tag build we push it to Docker with that tag - docker build --build-arg webgoat_version=${TRAVIS_TAG} -f Dockerfile -t $REPO:${TRAVIS_TAG} . + docker build --build-arg webgoat_version=${TRAVIS_TAG:1} -f Dockerfile -t $REPO:${TRAVIS_TAG} . docker push $REPO elif [ "${BRANCH}" == "develop" ]; then docker build -f Dockerfile -t $REPO:snapshot .