From a8586c6a851f4e8975f6a290ec045e0519c6465e Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Tue, 22 Oct 2019 16:28:39 -0700 Subject: [PATCH] Add AGAMA_VERSION vs TAG setting on build-images Signed-off-by: James Ketrenos --- scripts/build-images | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/build-images b/scripts/build-images index 6832bbf..85b527c 100755 --- a/scripts/build-images +++ b/scripts/build-images @@ -14,7 +14,14 @@ fi export $(sed -nE "s,(^[^#][^=]*).*$,\1,pg" SOLUTION | ${CMD} -d '\n') export $(sed -nE "s,(^[^#][^=]*).*$,\1,pg" MANIFEST | ${CMD} -d '\n') -docker build . -t ${CONTAINER}:agama-${AGAMA_VERSION} || { +AGAMA_VERSION=${AGAMA_VERSION:-N/A} +[[ "${AGAMA_VERSION}" == "N/A" ]] && { + TAG=${TAG:-build-$(date +%Y%m%d)} +} || { + TAG=${TAG:-agama-${AGAMA_VERSION}} +} + +docker build . -t ${CONTAINER}:${TAG} || { cat << EOM Building docker image failed.