From 48ba942f7e5e6798c99c619167c32ec6686bdd62 Mon Sep 17 00:00:00 2001
From: Sylvester Joosten <sjoosten@anl.gov>
Date: Fri, 8 Jan 2021 05:21:15 +0000
Subject: [PATCH] fixed issue with stable version number

---
 gitlab-ci/docker/Makefile          | 6 +++---
 gitlab-ci/docker/version-stable.sh | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gitlab-ci/docker/Makefile b/gitlab-ci/docker/Makefile
index 4f05c8d37..867602f65 100644
--- a/gitlab-ci/docker/Makefile
+++ b/gitlab-ci/docker/Makefile
@@ -12,8 +12,8 @@ export $(shell sed 's/=.*//' $(cnf))
 SHELL = bash
 
 ## Get our version tag and stable version tag
-VERSION=$(shell head -n1 ../../VERSION)
-STABLE=$(shell echo ${$(head -n1 ../../VERSION)%.*}-stable)
+VERSION=$(shell bash version.sh)
+STABLE=$(shell bash version-stable.sh)
 
 # help will output the help for each task
 # thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
@@ -39,7 +39,7 @@ build-unstable-nc: ## Build the container without caching (from scratch)
 # ==========================================================================
 #
 login: ## Auto login to AWS-ECR unsing aws-cli
-	docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}/${CI_PROJECT_PATH}
+	docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
 	echo "Login COMPLETE"
 
 stable: build-nc
diff --git a/gitlab-ci/docker/version-stable.sh b/gitlab-ci/docker/version-stable.sh
index 106797da2..973c1bcc3 100644
--- a/gitlab-ci/docker/version-stable.sh
+++ b/gitlab-ci/docker/version-stable.sh
@@ -2,5 +2,5 @@
 
 ## print the stable version tag for this version to the console
 
-version=head -n1 ../../VERSION
+VERSION=`head -n1 ../../VERSION`
 echo "${VERSION%.*}-stable"
-- 
GitLab