Created
April 13, 2016 08:56
-
-
Save zoidyzoidzoid/9f93d7ba51f0a90b7f1bf959d4e9a9b6 to your computer and use it in GitHub Desktop.
Script for updating requirements.txt using Kenneth Reitz's new better pip workflow: http://www.kennethreitz.org/essays/a-better-pip-workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -efxu | |
cd "$(dirname "$0")/.." | |
if [ ! -f requirements-to-freeze.txt ]; then | |
echo "No requirements to freeze file found!" | |
exit 1 | |
fi | |
rm -rf virtualenv | |
python -m virtualenv virtualenv -q | |
rm requirements.txt | |
virtualenv/bin/pip install -r requirements-to-freeze.txt --upgrade | |
virtualenv/bin/pip freeze > requirements.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment