From 063ad5a8fdcc358fe26a3828575394f604ee79bc Mon Sep 17 00:00:00 2001 From: Alexis Koralewski Date: Mon, 16 Oct 2023 09:30:20 +0200 Subject: [PATCH] add check of git pull failling in update script --- docker/PYROS_DOCKER_UPDATE | 15 +++++++++++++++ 1 file changed, 15 insertions(+), 0 deletions(-) diff --git a/docker/PYROS_DOCKER_UPDATE b/docker/PYROS_DOCKER_UPDATE index 2c0b9cd..b297d4f 100755 --- a/docker/PYROS_DOCKER_UPDATE +++ b/docker/PYROS_DOCKER_UPDATE @@ -14,6 +14,14 @@ fi echo "Updating Guitastro source code" cd ../vendor/guitastro/ gitpull_output=$(git pull 2>&1) +already_uptodate="Déjà à jour." +if [ $? -eq 1 ]; then + if [[ "$gitpull_output"!="$already_uptodate" ]]; then + echo "Git pull failed. Error message is:" + echo $gitpull_output + exit 1 + fi +fi echo $gitpull_output check_files=("docker-compose.yml" "Dockerfile" "install/requirements.in") for file in "${check_files[@]}" @@ -28,6 +36,13 @@ done cd $root_folder echo "Updating PyROS source code" gitpull_output=$(git pull 2>&1) +if [ $? -eq 1 ]; then + if [[ "$gitpull_output"!="$already_uptodate" ]]; then + echo "Git pull failed. Error message is:" + echo $gitpull_output + exit 1 + fi +fi echo $gitpull_output check_files=("docker-compose.yml" "Dockerfile" "install/requirements.in") for file in "${check_files[@]}" -- libgit2 0.21.2