test clear cache and cache requirements.txt

This commit is contained in:
Casey Faist
2020-03-19 16:20:30 -04:00
parent cc6a03aa54
commit f7c422e07d
2 changed files with 16 additions and 1 deletions
+10 -1
View File
@@ -96,6 +96,15 @@ if [ -f .heroku/python-version ]; then
fi
echo "$(diff "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt")"
# Remove python dependencies
if [[ ! -f "$CACHE_DIR/.heroku/requirements.txt" ]] || [[ diff "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt" ]]; then
puts-step "Clearing cached dependencies"
rm -rf .heroku/python
fi
if [ ! "$SKIP_INSTALL" ]; then
puts-step "Installing $PYTHON_VERSION"
@@ -129,7 +138,7 @@ if ! curl -s "${GETPIP_URL}" -o "$GETPIP_PY" &> /dev/null; then
exit 1
fi
# If Pip isn't up to date:
# If a new Python has been installed or Pip isn't up to date:
if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
puts-step "Installing pip"