Add fast option to autohelp-wrapper

Add -f option that uses existing environment and sources for quick
turn around.

Change-Id: I4f7febfb95701316387c640c676fb2da24063303
This commit is contained in:
Andreas Jaeger 2014-08-28 15:51:22 +02:00
parent 807ac96bc9
commit b612a6d598
2 changed files with 20 additions and 11 deletions

View File

@ -9,7 +9,8 @@ Release notes
* ``autohelp.py``: Improve sanitizer, better support for i18n in
projects, allow setting of title name for tables.
* ``autohelp-wrapper``: Smarter handling of the manuals repo and environment
setup, add support for the ``create`` subcommand.
setup, add support for the ``create`` subcommand, add support for
offline/fast operation.
* ``diff_branches.py``: Updated output format.
0.18.1

View File

@ -22,6 +22,7 @@ EXTRACT_SWIFT="python $HERE/extract_swift_flags.py"
GITBASE=git://git.openstack.org/openstack
PROJECTS="ceilometer cinder glance heat keystone neutron nova sahara swift trove"
BRANCH=master
FAST=0
usage() {
echo "Wrapper for autohelp.py"
@ -37,6 +38,7 @@ usage() {
echo "Options:"
echo " -b BRANCH: Work on this branch (defaults to master)"
echo " -c: Recreate the virtual environment"
echo " -f: Work offline: Do not change environment or sources"
echo " -e PATH: Create the virtualenv in PATH"
}
@ -98,7 +100,7 @@ setup_tools() {
fi
}
while getopts :b:e:c opt; do
while getopts :b:e:cf opt; do
case $opt in
b)
BRANCH=$OPTARG
@ -112,6 +114,10 @@ while getopts :b:e:c opt; do
VENVDIR=$OPTARG
shift 2
;;
f)
FAST=1
shift
;;
\?)
usage
exit 1
@ -143,17 +149,19 @@ fi
[ $# != 0 ] && PROJECTS="$*"
setup_venv
setup_tools
if [ "$FAST" -eq 0 ] ; then
setup_tools
for project in $PROJECTS; do
get_project $project
for project in $PROJECTS; do
get_project $project
(
cd $SOURCESDIR/$project
git checkout $BRANCH
python setup.py install
)
done
(
cd $SOURCESDIR/$project
git checkout $BRANCH
python setup.py install
)
done
fi
for project in $PROJECTS; do
if [ "$ACTION" = "setup" ]; then