CI: Make validate_reqs_files job consistent with current relock process

pull/2499/head
David Núñez 2021-01-06 02:58:12 +01:00
parent b75d02ec9e
commit 9f3f94e86e
3 changed files with 4 additions and 31 deletions

View File

@ -3,7 +3,7 @@
set -e
# update lock and build requirements files
yes | ./scripts/circle/rebuild_pipenv.sh circlereqs
yes | ./scripts/installation/relock_dependencies.sh circlereqs
echo "---- validating requirements.txt ----"
REQSHASH=$(md5sum requirements.txt | cut -d ' ' -f1)
@ -16,7 +16,7 @@ if [ $REQSHASH == $TESTHASH ]; then
else
echo "- requirements.txt contains inconsistencies ...."
echo "- you may want to run `pipenv sync --dev` and then ./scripts/circle/rebuild_pipenv.sh ...."
echo "- you may want to run `pipenv sync --dev` and then ./scripts/installation/relock_dependencies.sh ...."
echo "- which will rebuild your *requirements.txt files ...."
diff requirements.txt circlereqs.txt
exit 2
@ -34,7 +34,7 @@ if [ $REQSHASH == $TESTHASH ]; then
else
echo "- dev-requirements.txt contains inconsistencies ...."
echo "- you may want to run `pipenv sync --dev` and then ./scripts/circle/rebuild_pipenv.sh ...."
echo "- you may want to run `pipenv sync --dev` and then ./scripts/installation/relock_dependencies.sh ...."
echo "- which will rebuild your *requirements.txt files ...."
diff dev-requirements.txt dev-circlereqs.txt
exit 2

View File

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

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# can change output file names with rebuild_pipenv.sh <prefix>
# can change output file names with relock_dependencies.sh <prefix>
PREFIX=${1:-requirements}
# these steps might fail, but that's okay.