diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2016-11-10 16:40:39 +0530 |
---|---|---|
committer | Vishal Bhoj <vishal.bhoj@linaro.org> | 2016-11-10 16:41:43 +0530 |
commit | 23b7c2ce576d10ac51de45336d40c554f43f7876 (patch) | |
tree | 21ca8074958f45a37496223ac3ef0fe730f60576 | |
parent | 5efb3937ec13bf9ae6bffa88c1b03f7aebb2b4bc (diff) |
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 <vishal.bhoj@linaro.org>
-rw-r--r-- | build-scripts/build-android | 2 | ||||
-rwxr-xr-x | node/build | 7 |
2 files changed, 8 insertions, 1 deletions
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 @@ -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 |