Commit 8637dc05 authored by Kenneth Reitz's avatar Kenneth Reitz

cleanups

parent 99557332
......@@ -41,9 +41,7 @@ ROOT_DIR=$(dirname $BIN_DIR)
BUILD_DIR=$1
CACHE_DIR=$2
# Where to store the pip download cache.
CACHED_DIRS=".heroku"
PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-$CACHE_DIR/pip_downloads}
# Static configurations for virtualenv caches.
VIRTUALENV_LOC=".heroku/venv"
......@@ -58,7 +56,7 @@ PYTHON_EXE="/app/.heroku/python/bin/python"
unset GIT_DIR PYTHONHOME PYTHONPATH LD_LIBRARY_PATH LIBRARY_PATH
# We'll need to send these statics to other scripts we `source`.
export PIP_DOWNLOAD_CACHE BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
# Syntax sugar.
source $BIN_DIR/utils
......@@ -105,11 +103,11 @@ fi
# ### The Cache
mkdir -p $CACHE_DIR
[ ! "$(ls -A $CACHE_DIR)" ] && export FRESH_APP=1
[ ! "$(ls -A $CACHE_DIR)" ]
# Purge "old-style" virtualenvs.
[ -d $CACHE_DIR/$LEGACY_TRIGGER ] && rm -fr $CACHE_DIR/*
[ -d $CACHE_DIR/$VIRTUALENV_LOC ] && rm -fr $CACHE_DIR/*
[ -d $CACHE_DIR/$LEGACY_TRIGGER ] && rm -fr $CACHE_DIR/.heroku/bin $CACHE_DIR/.heroku/lib $CACHE_DIR/.heroku/include
[ -d $CACHE_DIR/$VIRTUALENV_LOC ] && rm -fr $CACHE_DIR/.heroku/venv
# Restore old artifacts from the cache.
for dir in $CACHED_DIRS; do
......
......@@ -9,6 +9,9 @@ indent() {
MANAGE_FILE=$(find . -maxdepth 3 -type f -name 'manage.py' | head -1)
MANAGE_FILE=${MANAGE_FILE:2}
if [ -f .heroku/collectstatic_disabled ]; then
DISABLE_COLLECTSTATIC=1
fi
if [ ! "$DISABLE_COLLECTSTATIC" ]; then
set +e
......
......@@ -13,11 +13,6 @@ cleanup() {
sed $SED_FLAG -e 's/\.\.\.\+/.../g' | sed $SED_FLAG '/already satisfied/Id' | sed $SED_FLAG -e '/Overwriting/Id' | sed $SED_FLAG -e '/python executable/Id' | sed $SED_FLAG -e '/no previously-included files/Id'
}
# Virtualenv wrapper.
function virtualenv (){
python "$ROOT_DIR/vendor/virtualenv-1.8.4/virtualenv.py" "$@"
}
# Buildpack Steps.
function puts-step (){
echo "-----> $@"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment