X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fgerrit-fetch-dependencies.sh;h=d7f830b304812cc1800e7133c7c852a935af2081;hb=d8598304d2156c39d702bb5e087b802602f503a4;hp=99a71f021ce637bf01a162ba3ca6b30494095df7;hpb=26f8f7567b04513c34498492b14f19c4741e6921;p=releng%2Fglobal-jjb.git diff --git a/shell/gerrit-fetch-dependencies.sh b/shell/gerrit-fetch-dependencies.sh index 99a71f02..d7f830b3 100644 --- a/shell/gerrit-fetch-dependencies.sh +++ b/shell/gerrit-fetch-dependencies.sh @@ -30,7 +30,7 @@ set +u # Allow unbound variables for virtualenv virtualenv --quiet "/tmp/v/git-review" # shellcheck source=/tmp/v/git-review/bin/activate disable=SC1091 source "/tmp/v/git-review/bin/activate" -pip install --quiet --upgrade pip +pip install --quiet --upgrade pip setuptools pip install --quiet --upgrade git-review set -u # End git-review workaround @@ -41,6 +41,11 @@ for patch in $(echo "${PATCHES[@]}"); do project=$(echo "$json" | jq -r '.project') branch=$(echo "$json" | jq -r '.branch') + if [ "$GERRIT_CHANGE_NUMBER" == "$patch" ]; then + echo "WARN: GERRIT_CHANGE and $patch are one and the same. Ignoring patch..." + continue + fi + if [ ! -d "$REPOS_DIR/$project" ]; then git clone -q --depth 1 -b "$branch" "$GIT_URL/$project" "$REPOS_DIR/$project"