From c133327bfee77e5040ed33aaaafaea7fe02030e2 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Wed, 7 Dec 2022 16:37:07 +0100 Subject: [PATCH] Improved update.sh --- update.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/update.sh b/update.sh index e445c60..7ec70b2 100755 --- a/update.sh +++ b/update.sh @@ -2,11 +2,19 @@ cd "${0%/*}" || exit -mkdir -p workdir +echo "Creating workdir..." +mkdir -p workdir || exit # needs the presence of a docker-compose.yml file (use the provided example) -docker compose down && \ -git pull && \ -mvn clean package && \ -docker compose up -d \ No newline at end of file +echo "Stopping service..." +docker compose down || exit + +echo "Pulling new version..." +git pull || exit + +echo "Compiling new version..." +mvn clean package || exit + +echo "Starting service" +docker compose up -d || exit \ No newline at end of file