1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-11-14 02:57:18 +00:00

Refactor TFW relase name generation to separate function

This commit is contained in:
Kristóf Tóth 2018-03-30 19:33:48 +02:00
parent c9196dda75
commit 2a8342d92b

View File

@ -27,9 +27,14 @@ run_frontend()
build_baseimage() build_baseimage()
{ {
cd $BASEIMAGE_PATH cd $BASEIMAGE_PATH
docker build -t "${BASEIMAGE_NAME}:$(baseimage_releasename)" -t "${BASEIMAGE_NAME}:latest" .
}
baseimage_releasename()
{
VERSION="$(cat VERSION | head -n 1)" VERSION="$(cat VERSION | head -n 1)"
DATE="$(date +%Y%m%d)" DATE="$(date +%Y%m%d)"
docker build -t "${BASEIMAGE_NAME}:${VERSION}-${DATE}" -t "${BASEIMAGE_NAME}:latest" . printf "${VERSION}-${DATE}"
} }
build_backend() build_backend()