2019-06-13 20:30:52 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2019-06-14 00:58:07 +00:00
|
|
|
# update lock and build requirements files
|
2019-06-13 20:30:52 +00:00
|
|
|
yes | ./scripts/installation/rebuild_pipenv.sh circlereqs
|
|
|
|
|
2019-06-14 00:58:07 +00:00
|
|
|
echo "---- validating requirements.txt ----"
|
|
|
|
REQSHASH=$(md5sum requirements.txt | cut -d ' ' -f1)
|
|
|
|
TESTHASH=$(md5sum circlereqs.txt | cut -d ' ' -f1)
|
|
|
|
|
|
|
|
echo "- $REQSHASH"
|
|
|
|
echo "- $TESTHASH"
|
|
|
|
if [ $REQSHASH == $TESTHASH ]; then
|
|
|
|
echo "- requirements.txt is valid ...."
|
2019-06-13 20:30:52 +00:00
|
|
|
|
|
|
|
else
|
2019-06-14 00:58:07 +00:00
|
|
|
echo "- requirements.txt contains inconsistencies ...."
|
|
|
|
echo "- you may want to run `pipenv sync --dev` and then ./scripts/installation/rebuild_pipenv.sh ...."
|
|
|
|
echo "- which will rebuild your *requirements.txt files ...."
|
2019-06-13 20:30:52 +00:00
|
|
|
diff requirements.txt circlereqs.txt
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
2019-06-14 00:58:07 +00:00
|
|
|
echo "---- validating dev-requirements.txt ----"
|
|
|
|
REQSHASH=$(md5sum dev-requirements.txt | cut -d ' ' -f1)
|
|
|
|
TESTHASH=$(md5sum dev-circlereqs.txt | cut -d ' ' -f1)
|
|
|
|
|
|
|
|
echo "- $REQSHASH"
|
|
|
|
echo "- $TESTHASH"
|
|
|
|
|
|
|
|
if [ $REQSHASH == $TESTHASH ]; then
|
|
|
|
echo "- dev-requirements.txt is valid ...."
|
2019-06-13 20:30:52 +00:00
|
|
|
|
|
|
|
else
|
2019-06-14 00:58:07 +00:00
|
|
|
echo "- dev-requirements.txt contains inconsistencies ...."
|
|
|
|
echo "- you may want to run `pipenv sync --dev` and then ./scripts/installation/rebuild_pipenv.sh ...."
|
|
|
|
echo "- which will rebuild your *requirements.txt files ...."
|
2019-06-13 20:30:52 +00:00
|
|
|
diff dev-requirements.txt dev-circlereqs.txt
|
|
|
|
exit 2
|
2019-06-14 00:58:07 +00:00
|
|
|
fi
|