From eb3fb879477d5a000ed8c15094c8159cfe771505 Mon Sep 17 00:00:00 2001 From: James Green Date: Fri, 16 Aug 2024 10:46:49 +0100 Subject: [PATCH] condition the use of .env --- scripts/deploy.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 25b8561..0340587 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -6,7 +6,14 @@ # - Nginx Ingress Controller set -e -source .env + +# Check if the .env file exists +if [ -f .env ]; then + # If it exists, source the .env file + source .env +else + echo ".env file not found. Skipping..." +fi ORANGE='\033[1;33m' PURPLE='\033[1;35m'