2019-09-13 17:52:28 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-01-06 01:58:12 +00:00
|
|
|
# can change output file names with relock_dependencies.sh <prefix>
|
2019-09-13 17:52:28 +00:00
|
|
|
PREFIX=${1:-requirements}
|
|
|
|
|
2020-04-24 17:48:03 +00:00
|
|
|
# these steps might fail, but that's okay.
|
2019-09-13 17:52:28 +00:00
|
|
|
echo "Removing existing lock files..."
|
|
|
|
pipenv --rm
|
2020-03-19 18:20:44 +00:00
|
|
|
rm -f Pipfile.lock
|
2019-09-13 17:52:28 +00:00
|
|
|
rm -f $PREFIX.txt
|
|
|
|
rm -f dev-$PREFIX.txt
|
2021-01-07 16:10:57 +00:00
|
|
|
rm -f docs-$PREFIX.txt
|
2019-09-13 17:52:28 +00:00
|
|
|
|
2020-04-24 17:48:03 +00:00
|
|
|
echo "Removing pip and pipenv system cache..."
|
|
|
|
rm -r ~/.cache/pip ~/.cache/pipenv
|
2019-09-13 17:52:28 +00:00
|
|
|
|
2020-04-24 17:48:03 +00:00
|
|
|
# start enforcing failures
|
|
|
|
set -e
|
2019-09-13 17:52:28 +00:00
|
|
|
|
2021-01-07 16:10:57 +00:00
|
|
|
echo "Building Documentation Requirements"
|
|
|
|
pushd ./scripts/dependencies/docs
|
|
|
|
pipenv lock --clear --pre --requirements --no-header > ../../../docs-$PREFIX.txt
|
|
|
|
rm -f Pipfile.lock
|
|
|
|
pipenv --rm
|
|
|
|
popd
|
|
|
|
|
2020-04-24 17:48:03 +00:00
|
|
|
echo "Building Development Requirements"
|
2020-12-18 00:20:15 +00:00
|
|
|
pipenv lock --clear --pre --requirements --dev-only --no-header > dev-$PREFIX.txt
|
2019-09-13 17:52:28 +00:00
|
|
|
|
2020-04-24 17:48:03 +00:00
|
|
|
echo "Building Standard Requirements"
|
2020-11-17 12:15:34 +00:00
|
|
|
pipenv lock --clear --pre --requirements --no-header > $PREFIX.txt
|
2019-09-13 17:52:28 +00:00
|
|
|
|
|
|
|
echo "OK!"
|