From 23b7c2ce576d10ac51de45336d40c554f43f7876 Mon Sep 17 00:00:00 2001 From: Vishal Bhoj Date: Thu, 10 Nov 2016 16:40:39 +0530 Subject: gerrit trigger: handle changes to android-build-configs configs are not part of manifest hence these need to be handled before parsing the variables. Change-Id: I6bedd35e4b8bfcb219ca9ece1f958f7d9f052a2b Signed-off-by: Vishal Bhoj --- build-scripts/build-android | 2 +- node/build | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/build-scripts/build-android b/build-scripts/build-android index d0fc4a2..a1e648a 100644 --- a/build-scripts/build-android +++ b/build-scripts/build-android @@ -71,7 +71,7 @@ else repo-sync-from-mirror "${1}" fi - if [ -n "$GERRIT_PROJECT" ] && [ $GERRIT_EVENT_TYPE == "comment-added" ]; then + if [ -n "$GERRIT_PROJECT" ] && [ $GERRIT_PROJECT != "android-build-configs" ] && [ $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 diff --git a/node/build b/node/build index 36879e0..ac9a7e9 100755 --- a/node/build +++ b/node/build @@ -74,6 +74,13 @@ if [ -n "$BUILD_CONFIG_REPO" ]; then git clone "$BUILD_CONFIG_REPO" cd * git checkout "$BUILD_CONFIG_BRANCH" + if [ -n "$GERRIT_PROJECT" ] && [ $GERRIT_PROJECT == "android-build-configs" && [ $GERRIT_EVENT_TYPE == "comment-added" ]; then + 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 + fi + fi $BUILD_SCRIPT_ROOT/../node/prepare_build_config.py "$(cat "$BUILD_CONFIG_FILENAME")" cd $save_dir source $(get_build_config)/build-tools/build-config -- cgit v1.2.3