adjust the pattern for updating constraints file URLs

With more projects using tox_install.sh, fewer match the pattern
starting with "-c" that was being passed directly to pip. Remove that
part of the pattern and rely on just matching the {env:...} syntax that
tox uses to pass values to arbitrary commands.

For an example of a project where the old version of the script failed
but this change worked, see Iffd79e8d267142579f71248e8b78ecb59f07d522

Change-Id: Idc25df0100153c324674f6d60fe5cfceaea59d54
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-01-18 12:10:55 -05:00
parent dd8e58a966
commit 19bb031916

View File

@ -85,7 +85,7 @@ function update_upper_constraints {
echo "No tox.ini file, skipping constraints"
return 0
fi
sed -i~ -e "s,-c.*{\(env:UPPER_CONSTRAINTS_FILE\)[^ ]*},-c{\1:$uc_url}," tox.ini
sed -i~ -e "s,{\(env:UPPER_CONSTRAINTS_FILE\)[^ ]*},{\1:$uc_url}," tox.ini
if ! git diff --exit-code >/dev/null 2>&1 ; then
git add tox.ini
git commit -m "Update UPPER_CONSTRAINTS_FILE for $branch"