Permalink
Browse files

Merge "Add script for updating requirements"

  • Loading branch information...
2 parents f4ecd47 + edaf0c4 commit 0aeb21c145ceb0b053396095369e9df676236362 Jenkins committed with openstack-gerrit Mar 22, 2013
Showing with 30 additions and 0 deletions.
  1. +30 −0 tools/update.sh
View
@@ -0,0 +1,30 @@
+#!/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

0 comments on commit 0aeb21c

Please sign in to comment.