Merge "Address review comments for make_missing_releases"

This commit is contained in:
Zuul 2020-01-13 19:50:53 +00:00 committed by Gerrit Code Review
commit bdd5e522e7

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# Wrapper script to locate run pre-defined queries and if needed create new releases # Wrapper script to locate run pre-defined queries and if needed create new
# releases
# #
# All Rights Reserved. # All Rights Reserved.
# #
@ -21,7 +22,7 @@ set -e
function usage { function usage {
echo "Usage: make_missing_releases.sh <series> <stage>" echo "Usage: make_missing_releases.sh <series> <stage>"
echo echo
echo "Valid valules for stage are:" echo "Valid values for stage are:"
echo " cwi-m) Used at the m{1,2,3} to run 'interactive release on" echo " cwi-m) Used at the m{1,2,3} to run 'interactive release on"
echo " cycle-with-intermediary libraries" echo " cycle-with-intermediary libraries"
echo echo
@ -29,8 +30,8 @@ function usage {
"needed create new releases" "needed create new releases"
} }
# Run a command but echo it first, kind of a light-weight set -x but avoids opencoding things # Run a command but echo it first, kind of a light-weight set -x but avoids
# and there for glogic errors # opencoding things and there for glogic errors
function v_run { function v_run {
echo "$*" echo "$*"
"$@" "$@"
@ -41,13 +42,16 @@ if [ $# -lt 2 ]; then
exit 2 exit 2
fi fi
TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BASEDIR=$(dirname $TOOLSDIR)
# FIXME(tonyb): We *almost* have this in 'functions' update enable_tox_venv() # FIXME(tonyb): We *almost* have this in 'functions' update enable_tox_venv()
# and use that everywhere # and use that everywhere
if [[ -z "$VIRTUAL_ENV" ]]; then if [[ -z "$VIRTUAL_ENV" ]]; then
if [[ ! -d .tox/venv ]]; then if [[ ! -d .tox/venv ]]; then
tox -e venv --notest (cd $BASEDIR && tox -e venv --notest)
fi fi
source ./.tox/venv/bin/activate source $BASEDIR/.tox/venv/bin/activate
fi fi
stable_branch='' stable_branch=''