Skip to content

Commit 813fcfa

Browse files
author
Nikolay Mahotkin
committed
Add script to allow update dependencies in all envs
Change-Id: I6fa216c2d0943b4badc0fc1f397347f0f70fdde0
1 parent 9680b76 commit 813fcfa

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tools/update_env_deps

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
TOX_ENVLIST=`grep envlist tox.ini | cut -d '=' -f 2 | tr ',' ' '`
2+
TESTENVS=`grep testenv tox.ini | awk -F ':' '{print $2}' | tr '[]' ' '`
3+
UNFILTERED_ENVLIST=`echo "$TOX_ENVLIST $TESTENVS"`
4+
ENVLIST=$( awk 'BEGIN{RS=ORS=" "}!a[$0]++' <<<$UNFILTERED_ENVLIST );
5+
for env in $ENVLIST
6+
do
7+
ENV_PATH=.tox/$env
8+
PIP_PATH=$ENV_PATH/bin/pip
9+
echo -e "\nUpdate environment ${env}...\n"
10+
if [ ! -d $ENV_PATH -o ! -f $PIP_PATH ]
11+
then
12+
tox --notest -e$env
13+
else
14+
$PIP_PATH install -r requirements.txt -r test-requirements.txt
15+
fi
16+
done

0 commit comments

Comments
 (0)