From 2a8342d92b82dd69146e26e8170d01b634ee3e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 30 Mar 2018 19:33:48 +0200 Subject: [PATCH] Refactor TFW relase name generation to separate function --- hack/tfw.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hack/tfw.sh b/hack/tfw.sh index b4854ce..0651115 100755 --- a/hack/tfw.sh +++ b/hack/tfw.sh @@ -27,9 +27,14 @@ run_frontend() build_baseimage() { cd $BASEIMAGE_PATH + docker build -t "${BASEIMAGE_NAME}:$(baseimage_releasename)" -t "${BASEIMAGE_NAME}:latest" . +} + +baseimage_releasename() +{ VERSION="$(cat VERSION | head -n 1)" DATE="$(date +%Y%m%d)" - docker build -t "${BASEIMAGE_NAME}:${VERSION}-${DATE}" -t "${BASEIMAGE_NAME}:latest" . + printf "${VERSION}-${DATE}" } build_backend()