Fix propose_translation runs
The propose_translation runs use "#!/bin/bash -xe" - thus exit when an error occurs. It's ok for the grep in filter_commit to not found anything, thus ignore exit results. Otherwise the script will exit with error code which is not the intented behaviour. This unbreaks all propose_translation jobs. My tests were done without "set -e" in the environment ;( Change-Id: I8fff0bc42b45b356dd1ca3ab9b2586628ff59a57
This commit is contained in:
parent
8d3e6c8f45
commit
9f52dbb42c
@ -269,9 +269,12 @@ function filter_commits ()
|
|||||||
# comment lines, or diff file information.
|
# comment lines, or diff file information.
|
||||||
for f in `git diff --cached --name-only`
|
for f in `git diff --cached --name-only`
|
||||||
do
|
do
|
||||||
|
# It's ok if the grep fails
|
||||||
|
set +e
|
||||||
changed=$(git diff --cached "$f" \
|
changed=$(git diff --cached "$f" \
|
||||||
| egrep -v "(POT-Creation-Date|Project-Id-Version|PO-Revision-Date)" \
|
| egrep -v "(POT-Creation-Date|Project-Id-Version|PO-Revision-Date)" \
|
||||||
| egrep -c "^([-+][^-+#])")
|
| egrep -c "^([-+][^-+#])")
|
||||||
|
set -e
|
||||||
if [ $changed -eq 0 ]
|
if [ $changed -eq 0 ]
|
||||||
then
|
then
|
||||||
git reset -q "$f"
|
git reset -q "$f"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user