aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build-scripts/build-android10
1 files changed, 7 insertions, 3 deletions
diff --git a/build-scripts/build-android b/build-scripts/build-android
index cfe4347..3c0763a 100644
--- a/build-scripts/build-android
+++ b/build-scripts/build-android
@@ -71,16 +71,19 @@ else
repo-sync-from-mirror "${1}"
fi
- if [ -n "$GERRIT_PROJECT" ] && [ $GERRIT_EVENT_TYPE == "patchset-created" ]; then
+ if [ -n "$GERRIT_PROJECT" ] && [ $GERRIT_EVENT_TYPE == "comment-added" ]; then
if [ "$GERRIT_PROJECT" == "platform/manifest" ]; then
cd .repo/local_manifests;
git pull http://review.android.git.linaro.org/platform/manifest $GERRIT_REFSPEC
cd -
else
cd `grep -rni $GERRIT_PROJECT\" .repo/local_manifests | grep -Po 'path="\K[^"]*'`
- git pull http://review.android.git.linaro.org/$GERRIT_PROJECT $GERRIT_REFSPEC
+ if git pull http://${GERRIT_HOST}/${GERRIT_PROJECT} ${GERRIT_REFSPEC} | grep -q "Automatic merge failed"; then
+ git reset --hard
+ echo "Error: *** Error patch merge failed"
+ exit 1
cd -
- fi
+ fi
fi
if [ -n "$PATCHSETS" ]; then
@@ -88,6 +91,7 @@ else
sh ./android-patchsets/$i
done
fi
+
if [ -n "$POST_CHECKOUT_HOOK" ]; then
# if echo "$POST_CHECKOUT_HOOK" | grep -F / >/dev/null; then
# echo "Invalid POST_CHECKOUT_HOOK: $POST_CHECKOUT_HOOK"