Address review comments for make_missing_releases

Fixes some comments from the initial review and minor cleanup.

Change-Id: I17f18f63cb7e9da4bc7504405472e3ac39151c3e
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-01-09 11:56:25 -06:00
parent 7045ff71b0
commit b1ed70c939
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8

@ -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=''