From 5f8d7382efd757ae35fbc4a91985452f3a3f07d2 Mon Sep 17 00:00:00 2001 From: "Dr. Sergey Pogodin" Date: Mon, 29 Oct 2018 12:18:51 +0100 Subject: [PATCH] Fix of Docker build & release shell scrip --- docker_build_and_deploy.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker_build_and_deploy.sh b/docker_build_and_deploy.sh index 53eca814..553cf59b 100755 --- a/docker_build_and_deploy.sh +++ b/docker_build_and_deploy.sh @@ -4,7 +4,14 @@ set -eo pipefail NAME=$1 -VERSION_TAG=${NAME}:${CIRCLE_TAG#?} +if [ -z $CIRCLE_TAG ]; +then + VERSION=${CIRCLE_TAG#?} +else + VERSION=${CRICLE_SHA1} +fi + +VERSION_TAG=${NAME}:${VERSION} LATEST_TAG=${NAME}:latest docker build -t ${VERSION_TAG} .