From 89d465ab6fdbe58446a236c46d89782d7eb890ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Sat, 24 Mar 2018 11:47:38 +0100 Subject: [PATCH] Improve bootstrap script logic --- hack/bootstrap_tfw_dev.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/hack/bootstrap_tfw_dev.sh b/hack/bootstrap_tfw_dev.sh index 8464de2..f3867df 100755 --- a/hack/bootstrap_tfw_dev.sh +++ b/hack/bootstrap_tfw_dev.sh @@ -1,21 +1,25 @@ #!/usr/bin/env bash set -eo pipefail -LOGFILE="/tmp/bootstrap_tfw.log" +TFW_POSTFIX=tutorial-framework +BASEIMAGE=baseimage-${TFW_POSTFIX} +BACKEND=test-${TFW_POSTFIX} +FRONTEND=frontend-${TFW_POSTFIX} +LOGFILE=/tmp/bootstrap_tfw.log trap 'echo "Something went wrong. Read the log az $LOGFILE"' ERR echo -n "Cloning TFW repositories... " -echo -n "baseimage... " && git clone git@github.com:avatao-content/baseimage-tutorial-framework.git >> $LOGFILE 2>&1 -echo -n "frontend... " && git clone git@github.com:avatao-content/frontend-tutorial-framework.git >> $LOGFILE 2>&1 -echo -n "test... " && git clone git@github.com:avatao-content/test-tutorial-framework.git >> $LOGFILE 2>&1 +echo -n "baseimage... " && git clone git@github.com:avatao-content/${BASEIMAGE}.git >> $LOGFILE 2>&1 +echo -n "frontend... " && git clone git@github.com:avatao-content/${FRONTEND}.git >> $LOGFILE 2>&1 +echo -n "test... " && git clone git@github.com:avatao-content/${BACKEND}.git >> $LOGFILE 2>&1 echo "Done!" echo echo -n "Building baseimage and installing frontend dependencies... " -cd baseimage-tutorial-framework -docker build -t baseimage-tutorial-framework . >> $LOGFILE 2>&1 & +cd $BASEIMAGE +docker build -t $BASEIMAGE . >> $LOGFILE 2>&1 & -cd ../frontend-tutorial-framework +cd ../${FRONTEND} yarn install >> $LOGFILE 2>&1 wait