Fix how we update requirements.txt

Currently, running sources-branch-updater.sh results in a
requirements.txt that looks like this:

pip==8.0.3 setuptools==20.2.2 wheel==0.29.0
setuptools==20.1.1
wheel==0.29.0

This is because at the top of the script we overwrite IFS and then at
the bottom we do not correctly loop over $PIP_CURRENT_OPTIONS.

This commit simply unsets IFS at the bottom so the loop can properly
iterate over $PIP_CURRENT_OPTIONS.

Change-Id: I16cc7070560f8e80b410cf5bf58675cb3f35e09a
This commit is contained in:
Matt Thompson
2016-03-03 11:51:14 +00:00
parent 46c1b53e52
commit 50b62cecc7

View File

@@ -135,6 +135,8 @@ for repo in $(grep 'git_repo\:' ${SERVICE_FILE}); do
done
unset IFS
# Finally, update the PIP_INSTALL_OPTIONS with the current versions of pip, wheel and setuptools
PIP_CURRENT_OPTIONS=$(./scripts/get-pypi-pkg-version.py -p pip setuptools wheel -l horizontal)
sed -i.bak "s|^PIP_INSTALL_OPTIONS=.*|PIP_INSTALL_OPTIONS=\$\{PIP_INSTALL_OPTIONS:-'${PIP_CURRENT_OPTIONS}'\}|" scripts/scripts-library.sh