Explorar o código

Add retry logic to git push

Peter Squicciarini %!s(int64=6) %!d(string=hai) anos
pai
achega
b5a6849834
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      update_version.sh

+ 4 - 1
update_version.sh

@@ -136,6 +136,9 @@ git pull origin master # in case another build just pushed
 git add .
 dateAndMonth=`date "+%D %T"`
 git commit -m "Travis update: $dateAndMonth (Build $TRAVIS_BUILD_NUMBER)"
-git push origin master --quiet
+if ! git push origin master --quiet; then
+  git pull origin master
+  git push origin master --quiet
+fi
 
 cd ..