Monty Taylor 7793815263 Handle empty requires lists.
Change-Id: I233547b2fd4055713c7611b7020fb3c45012e033
2012-05-06 11:35:40 -07:00

32 lines
833 B
Bash
Executable File

#!/bin/bash -xe
# Make sure there is a location on this builder to cache pip downloads
mkdir -p ~/cache/pip
export PIP_DOWNLOAD_CACHE=~/cache/pip
# Start with a clean slate
rm -fr jenkins_venvs
mkdir -p jenkins_venvs
# Build a venv for every known branch
for branch in `git branch -r |grep "origin/"|grep -v HEAD|sed "s/origin\///"`
do
echo "Building venv for $branch"
git checkout $branch
mkdir -p jenkins_venvs/$branch
bundle=jenkins_venvs/$branch/.cache.bundle
REQUIRES="$@"
if [ -f tools/pip-requires ] ; then
REQUIRES="${REQUIRES} -r tools/pip-requires"
fi
if [ -f tools/test-requires ] ; then
REQUIRES="${REQUIRES} -r tools/test-requires"
fi
if [ -z "${REQUIRES}"] ; then
REQUIRES="distribute"
fi
pip bundle $bundle $REQUIRES
done
git checkout master