edaf0c46a8
This is a hacky little script for pulling all of the requirements from each project into a consolidate pair of pip-requires and test-requires files. The output of this can't be passed to 'pip install -r' without some further sanitation to clean up duplicates. Change-Id: I47159f744086dc1de1b9fa07ef4cc5a0f85087b0
31 lines
890 B
Bash
Executable File
31 lines
890 B
Bash
Executable File
#!/bin/bash
|
|
|
|
GIT_DIR=${GIT_DIR-~/git/openstack}
|
|
FETCH_REMOTE=${FETCH_REMOTE-}
|
|
REMOTE_BRANCH=${REMOTE_BRANCH-gerrit/master}
|
|
PROJECTS=${PROJECTS-"nova glance keystone cinder quantum horizon swift heat ceilometer oslo-incubator python-novaclient python-glanceclient python-keystoneclient python-cinderclient python-quantumclient python-swiftclient"}
|
|
|
|
fetch() {
|
|
for p in $PROJECTS; do
|
|
cd $GIT_DIR/$p
|
|
git fetch gerrit
|
|
done
|
|
}
|
|
|
|
concat() {
|
|
path=$1; shift
|
|
|
|
for p in $PROJECTS; do
|
|
cd $GIT_DIR/$p
|
|
git cat-file -p $REMOTE_BRANCH:$path
|
|
done | tr A-Z a-z| sed 's/#.*$//; s/ *$//; /^ *$/d' | sort | uniq
|
|
}
|
|
|
|
[ -n "$FETCH_REMOTE" ] && fetch
|
|
|
|
concat tools/pip-requires > $GIT_DIR/requirements/tools/pip-requires
|
|
|
|
(sed p $GIT_DIR/requirements/tools/pip-requires;
|
|
concat tools/test-requires ) |
|
|
sort | uniq -u > $GIT_DIR/requirements/tools/test-requires
|