Commit 063ad5a8fdcc358fe26a3828575394f604ee79bc

Authored by Alexis Koralewski
1 parent 3496d8ed
Exists in dev

add check of git pull failling in update script

Showing 1 changed file with 15 additions and 0 deletions   Show diff stats
docker/PYROS_DOCKER_UPDATE
@@ -14,6 +14,14 @@ fi @@ -14,6 +14,14 @@ fi
14 echo "Updating Guitastro source code" 14 echo "Updating Guitastro source code"
15 cd ../vendor/guitastro/ 15 cd ../vendor/guitastro/
16 gitpull_output=$(git pull 2>&1) 16 gitpull_output=$(git pull 2>&1)
  17 +already_uptodate="Déjà à jour."
  18 +if [ $? -eq 1 ]; then
  19 + if [[ "$gitpull_output"!="$already_uptodate" ]]; then
  20 + echo "Git pull failed. Error message is:"
  21 + echo $gitpull_output
  22 + exit 1
  23 + fi
  24 +fi
17 echo $gitpull_output 25 echo $gitpull_output
18 check_files=("docker-compose.yml" "Dockerfile" "install/requirements.in") 26 check_files=("docker-compose.yml" "Dockerfile" "install/requirements.in")
19 for file in "${check_files[@]}" 27 for file in "${check_files[@]}"
@@ -28,6 +36,13 @@ done @@ -28,6 +36,13 @@ done
28 cd $root_folder 36 cd $root_folder
29 echo "Updating PyROS source code" 37 echo "Updating PyROS source code"
30 gitpull_output=$(git pull 2>&1) 38 gitpull_output=$(git pull 2>&1)
  39 +if [ $? -eq 1 ]; then
  40 + if [[ "$gitpull_output"!="$already_uptodate" ]]; then
  41 + echo "Git pull failed. Error message is:"
  42 + echo $gitpull_output
  43 + exit 1
  44 + fi
  45 +fi
31 echo $gitpull_output 46 echo $gitpull_output
32 check_files=("docker-compose.yml" "Dockerfile" "install/requirements.in") 47 check_files=("docker-compose.yml" "Dockerfile" "install/requirements.in")
33 for file in "${check_files[@]}" 48 for file in "${check_files[@]}"