diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2017-11-05 21:24:59 +0000 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2017-11-05 21:24:59 +0000 |
commit | d7eebfc48bc1f56561983696698347e30995dc5c (patch) | |
tree | 36919bad4690231472a094d6145accb1ea51ccd7 | |
parent | 630c32d5b275d00f788db075f60bbcd6c1ce0964 (diff) |
pmwg-ci: Fix baseline used as remote changev0.6
With the current code, we consider the baseline as one regular remote but
that is not true as we have specific policy for modified and updated baseline
(tag or commit-id changes). That triggers multiple times an update of the CI
loop for the same commit-id as it is assumed we have a remote branch updated
when the baseline is changed (and we want to track per tag).
Fix this by discarding the baseline when updating the remotes.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rwxr-xr-x | pmwg-ci-integ | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/pmwg-ci-integ b/pmwg-ci-integ index db5c9f0..6cc3489 100755 --- a/pmwg-ci-integ +++ b/pmwg-ci-integ @@ -393,17 +393,18 @@ do_add_new() { do_update_baseline() { - TAG1=$(get_last_change_id) + ID1=$(get_last_change_id) echo "Updating $BASELINE ..." + git remote update $BASELINE 2>&1 - TAG2=$(get_last_change_id) + ID2=$(get_last_change_id) - echo latest tag is $TAG2 + echo latest tag/id is $ID2 - if [ "$TAG1" != "$TAG2" ]; then - echo "$BASELINE has new tag $TAG2." + if [ "$ID1" != "$ID2" ]; then + echo "$BASELINE has new tagi/id $ID2." CHANGED=$((CHANGED + 1)) fi @@ -419,10 +420,16 @@ do_update_remote() { UPDATED=0 while read LINE; do - + echo $LINE | egrep -q '(^#|^\s*$|^\s*\t*#)' && continue REMOTE_NAME=$(echo $LINE | awk '{ print $1 }') + + if [ "$REMOTE_NAME" = "$BASELINE" ]; then + continue + fi + + echo "Updating $REMOTE_NAME" RES=$(git remote update $REMOTE_NAME 2>&1 | wc -l) if [ $RES -gt 1 ]; then |