nucypher/scripts/circle/rebuild_pipenv.sh

29 lines
619 B
Bash
Raw Normal View History

2019-05-27 05:13:46 +00:00
#!/usr/bin/env bash
# can change output file names with rebuild_pipenv.sh <prefix>
PREFIX=${1:-requirements}
2019-05-27 05:13:46 +00:00
read -p "Ok if we update your pip and setuptools? (type y or Y) " -n 1 -r
2019-06-14 00:58:07 +00:00
echo
2019-05-27 05:13:46 +00:00
if [[ $REPLY =~ ^[Yy]$ ]]
then
pip install --upgrade pip
pip install --upgrade setuptools
fi
rm -f $PREFIX.txt
rm -f dev-$PREFIX.txt
2019-05-27 05:13:46 +00:00
touch $PREFIX.txt
touch dev-$PREFIX.txt
2019-05-27 05:13:46 +00:00
2019-06-14 00:58:07 +00:00
set -e
echo "rebuilding Pipfile.lock... this may take awhile."
2019-05-27 05:13:46 +00:00
2019-06-14 00:58:07 +00:00
echo "bulding dev-$PREFIX.txt"
pipenv lock --clear --pre --requirements --dev > dev-$PREFIX.txt
2019-06-14 00:58:07 +00:00
echo "building $PREFIX.txt"
pipenv lock --clear --pre --requirements > $PREFIX.txt