f40847dd78
Killed trailing whitespace in the puppet repo files using `sed -r 's/\s+$//'`. Skip binary files and html templates for lodgeit and mailman. Change-Id: Ib43493161d8f0e8fae1426b22fb1737832ca14cd Reviewed-on: https://review.openstack.org/12969 Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com> Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
30 lines
985 B
Bash
30 lines
985 B
Bash
#!/bin/bash
|
|
# This file is managed by puppet.
|
|
# https://github.com/openstack/openstack-ci-puppet
|
|
|
|
export PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip}
|
|
export PIP_TEMP_DOWNLOAD=${PIP_TEMP_DOWNLOAD:-/var/lib/pip-download}
|
|
|
|
project=$1
|
|
pip_command='/usr/local/bin/pip install -M -U -I --exists-action=w --no-install'
|
|
|
|
cd ${PIP_TEMP_DOWNLOAD}
|
|
short_project=`echo ${project} | cut -f2 -d/`
|
|
if [ ! -d ${short_project} ] ; then
|
|
git clone git://github.com/${project}.git ${short_project} >/dev/null 2>&1
|
|
fi
|
|
cd ${short_project}
|
|
$pip_command pip
|
|
git fetch origin
|
|
for branch in `git branch -a | grep remotes.origin | grep -v origin.HEAD | awk '{print $1}' ` ; do
|
|
git reset --hard $branch
|
|
git clean -x -f -d -q
|
|
echo "*********************"
|
|
echo "Fetching pip requires for $project:$branch"
|
|
for requires_file in tools/pip-requires tools/test-requires ; do
|
|
if [ -f ${requires_file} ] ; then
|
|
$pip_command -r $requires_file
|
|
fi
|
|
done
|
|
done
|