From b8fd617d9ca435eb75e17611d19a44b4f53dd698 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 19 Mar 2020 16:26:56 -0400 Subject: [PATCH] Bash conditional operaters needed for brackets Removing brackets also works Wrong diff check - inverted Remove uninstall step Whitespace is hard --- bin/compile | 10 ++++++---- bin/steps/python | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/compile b/bin/compile index 4a214c2..4df9330 100755 --- a/bin/compile +++ b/bin/compile @@ -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. diff --git a/bin/steps/python b/bin/steps/python index 5d2d0f3..eef658f 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -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