Skip to content

Commit 2ef526a

Browse files
committedJul 2, 2018
Retry tx push on failure
1 parent 5b655b3 commit 2ef526a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed
 

‎scripts/update_ts.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ if [ $action = push ]; then
118118
tx pull -s -l none
119119
if ! [ -f "i18n/qgis_en.ts" ]; then
120120
echo Download of source translation failed
121-
exit
121+
exit 1
122122
fi
123123
elif [ $action = pull ]; then
124124
rm i18n/qgis_*.ts
@@ -176,7 +176,16 @@ perl -i.bak -ne 'print unless /^\s+<location.*qgs(expression|contexthelp)_texts\
176176

177177
if [ $action = push ]; then
178178
echo Pushing translation...
179-
tx push -s
179+
fail=1
180+
for i in $(seq 10); do
181+
tx push -s && fail=0 && break
182+
echo Retrying...
183+
sleep 10
184+
done
185+
if (( fail )); then
186+
echo "Could not push translations"
187+
exit 1
188+
fi
180189
else
181190
echo Updating TRANSLATORS File
182191
./scripts/tsstat.pl >doc/TRANSLATORS

0 commit comments

Comments
 (0)
Please sign in to comment.