From 8c2ad8c2a856e603c6775261727c6e27049f804d Mon Sep 17 00:00:00 2001 From: Adam Gandelman Date: Sat, 21 Feb 2015 23:27:18 +0100 Subject: [PATCH] Do not sync requirements to possibly capped library's master branch We've hit a situation where a project (pycadf) is listed and capped in stable/icehouse requirements.txt. pycadf is also listed in projects.txt. As part of the requirements integration test, we are attempting to update pycadf's master branch with stable/icehouse requirements, and failing because of new dependencies in pycadf that are not managed by stable/icehouse's GR. This updates integration.sh so that when we're testing a stable branch, we are only syncing requirements to other projects have stable branches. This avoids trying to sync stable requirements into library's master branches. Change-Id: I3b8845ad8e013cf6747995df5a62cc4f2ee85e01 --- tools/integration.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/integration.sh b/tools/integration.sh index 050b54a415..3c4d971a3e 100644 --- a/tools/integration.sh +++ b/tools/integration.sh @@ -79,6 +79,16 @@ for PROJECT in $PROJECTS ; do # requirements doesn't really install continue fi + if [[ "$BRANCH" =~ "stable" ]]; then + # When testing stable, only attempt to sync to projects that also + # have a corresponding stable branch. This prevents us from trying and + # failing to sync stable requirements to a library's master branch, + # when that same library may be listed and capped in global-requirements.txt. + proj_branch="$(cd $REPODIR/$SHORT_PROJECT && git rev-parse --symbolic-full-name --abbrev-ref HEAD)" + if [ "$proj_branch" != "$BRANCH" ]; then + continue + fi + fi # set up the project synced with the global requirements sudo chown -R $USER $REPODIR/$SHORT_PROJECT