Add support for running container separately in tfw.sh

This commit is contained in:
Kristóf Tóth 2018-05-04 11:00:22 +02:00
parent 0b8d084181
commit 950bd857a4
1 changed files with 13 additions and 8 deletions

View File

@ -125,29 +125,34 @@ start_test()
{
trap 'exit' INT TERM
trap 'kill 0' EXIT
run_frontend & build_and_run_test $@
[[ "${RUN_FRONTEND:-1}" == "1" ]] && run_frontend &
build_and_run_test $@
wait
}
case ${1:-} in
start)
RUN_FRONTEND=1 start_test ${@:2}
;;
startcontainer)
RUN_FRONTEND=0 start_test ${@:2}
;;
buildtfw)
build_baseimage
;;
releasetfw)
release_baseimage
;;
build)
build_test
;;
buildwithfrontend)
build_test_withfrontend
;;
start)
start_test ${@:2}
;;
releasetfw)
release_baseimage
;;
*)
echo "Usage: tfw.sh [start|buildtfw|build|buildwithfrontend|releasetfw]"
echo " |--- start: build & start TFW test"
echo " |--- start: build & start TFW test and Angular frontend"
echo " |--- startcontainer: build & start TFW test, container only"
echo " |--- buildtfw: build TFW baseimage"
echo " |--- build: build TFW baseimage and test"
echo " |--- buildwithfrontend: build TFW baseimage and test, include frontend in image"