Bash conditional operaters needed for brackets

Removing brackets also works

Wrong diff check - inverted

Remove uninstall step

Whitespace is hard
This commit is contained in:
Casey Faist
2020-03-19 16:26:56 -04:00
parent f7c422e07d
commit b8fd617d9c
2 changed files with 7 additions and 5 deletions
+6 -4
View File
@@ -262,14 +262,14 @@ source "$BIN_DIR/steps/pipenv"
# Uninstall removed dependencies with Pip.
# The buildpack will automatically remove any declared dependencies (in requirements.txt)
# that were explicitly removed. This machinery is a bit complex, but it is not complicated.
(( start=$(nowms) ))
# (( start=$(nowms) ))
# shellcheck source=bin/steps/pip-uninstall
source "$BIN_DIR/steps/pip-uninstall"
mtime "pip.uninstall.time" "${start}"
# source "$BIN_DIR/steps/pip-uninstall"
# mtime "pip.uninstall.time" "${start}"
# If no requirements.txt file given, assume `setup.py develop` is intended.
# This allows for people to ship a setup.py application to Heroku
# (which is rare, but I vouch that it should work!)
# TODO: hatchet test to confirm
if [ ! -f requirements.txt ] && [ ! -f Pipfile ]; then
echo "-e ." > requirements.txt
@@ -321,6 +321,8 @@ mtime "sqlite3.install.time" "${start}"
source "$BIN_DIR/steps/pip-install"
mtime "pip.install.time" "${start}"
# Support for NLTK corpora.
# Note: this may only work on Python 2.7. I don't think many customers use this functionality,
# and it should probably be undocumented.
+1 -1
View File
@@ -100,7 +100,7 @@ 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
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