From 0c3ed4152e01c9a823f4a5a7e0552e75884e6007 Mon Sep 17 00:00:00 2001 From: b1ek Date: Thu, 20 Apr 2023 15:59:48 +1000 Subject: [PATCH] check if build was successful in scripts --- dev.sh | 4 ++++ prod.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/dev.sh b/dev.sh index c901d01..4a5c300 100755 --- a/dev.sh +++ b/dev.sh @@ -11,6 +11,10 @@ cp docker-compose.dev docker-compose.yml cp Dockerfile.dev Dockerfile docker-compose build +if [ $? != 0 ]; then + echo "Error while building; check logs" >&2 + exit -1 +fi echo -e "\033[1;32mDevelopment environment set up successfully\033[0m" echo -e "Start it up with \033[1;32mdocker-compose up -d\033[0m!\n" \ No newline at end of file diff --git a/prod.sh b/prod.sh index 2beaf26..e70e2e4 100755 --- a/prod.sh +++ b/prod.sh @@ -11,6 +11,10 @@ cp docker-compose.prod docker-compose.yml cp Dockerfile.prod Dockerfile docker-compose build +if [ $? != 0 ]; then + echo "Error while building; check logs" >&2 + exit -1 +fi echo -e "\033[1;32mProduction environment set up successfully\033[0m" echo -e "Start it up with \033[1;32mdocker-compose up -d\033[0m!\n" \ No newline at end of file