mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 16:17:17 +00:00
34 lines
985 B
Bash
Executable File
34 lines
985 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
|
|
TFW_POSTFIX=tutorial-framework
|
|
BASEIMAGE=baseimage-${TFW_POSTFIX}
|
|
BACKEND=test-${TFW_POSTFIX}
|
|
FRONTEND=frontend-${TFW_POSTFIX}
|
|
LOGFILE=/tmp/bootstrap_tfw.log
|
|
|
|
showlog() { echo && echo "Error! Showing logs:" && cat $LOGFILE; }
|
|
cleanlog() { rm $LOGFILE; }
|
|
trap showlog ERR
|
|
trap cleanlog EXIT
|
|
|
|
: > $LOGFILE
|
|
echo -n "Cloning TFW repositories... "
|
|
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
|
|
docker build -t $BASEIMAGE . >> $LOGFILE 2>&1 &
|
|
|
|
cd ../${FRONTEND}
|
|
yarn install >> $LOGFILE 2>&1
|
|
|
|
wait
|
|
echo "Done!"
|
|
echo
|
|
echo "You can start TFW by executing the ${BACKEND}/hack/tfw_magic_start.sh script."
|