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()