From 95563d224f13176c581a801907a643f2b0406c33 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Tue, 1 Sep 2020 11:08:40 -0500 Subject: [PATCH] Fixing it --- .automation/upload-docker.sh | 39 ++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/.automation/upload-docker.sh b/.automation/upload-docker.sh index 63b6d7da..e7997b01 100755 --- a/.automation/upload-docker.sh +++ b/.automation/upload-docker.sh @@ -369,25 +369,30 @@ BuildImage() { info "Successfull [tag] Version:[${IMAGE_VERSION}] of additonal image!" fi - ################### - # Build the image # - ################### - docker build -t "${ADDITONAL_URL}:${MAJOR_TAG}" -f "${DOCKERFILE_PATH}" . 2>&1 + ######################################################## + # Need to see if we need to tag a major update as well # + ######################################################## + if [ ${UPDATE_MAJOR_TAG} -eq 1 ]; then + ################### + # Build the image # + ################### + docker build -t "${ADDITONAL_URL}:${MAJOR_TAG}" -f "${DOCKERFILE_PATH}" . 2>&1 - ####################### - # Load the error code # - ####################### - ERROR_CODE=$? + ####################### + # Load the error code # + ####################### + ERROR_CODE=$? - ############################## - # Check the shell for errors # - ############################## - if [ ${ERROR_CODE} -ne 0 ]; then - # ERROR - fatal "failed to [tag] Version:[${MAJOR_TAG}]Additonal location Dockerfile!" - else - # SUCCESS - info "Successfull [tag] Version:[${MAJOR_TAG}] of additonal image!" + ############################## + # Check the shell for errors # + ############################## + if [ ${ERROR_CODE} -ne 0 ]; then + # ERROR + fatal "failed to [tag] Version:[${MAJOR_TAG}]Additonal location Dockerfile!" + else + # SUCCESS + info "Successfull [tag] Version:[${MAJOR_TAG}] of additonal image!" + fi fi } ################################################################################