Skip to content

Commit

Permalink
checked in virtualenv safety check
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Reitz committed Nov 10, 2011
1 parent 46de6fc commit 87fa376
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/compile
Expand Up @@ -33,6 +33,12 @@ if [ "$NAME" = "Python" ]; then
[ -f manage.py ] && [ -f settings.py ] && { echo " ! Django app must be in a package subdirectory"; exit 1; }
fi

# reject a checked-in virtualenv
if [ -d "lib" ] || [ -d "bin" ]; then
echo " ! You have a virtualenv checked in. You should ignore the appropriate paths in your repo. See http://devcenter.heroku.com/articles/gitignore for more info.";
exit 1;
fi

# copy artifacts out of cache if exists
mkdir -p $CACHE_DIR
for dir in $VIRTUALENV_DIRS; do
Expand All @@ -49,7 +55,7 @@ if [ "$NAME" = "Python/Django" ]; then
SETTINGS_FILE=$(ls **/settings.py | head -1)
PROJECT=$(dirname $SETTINGS_FILE)
echo "Injecting code into $SETTINGS_FILE to read from DATABASE_URL" | indent

cat >>$SETTINGS_FILE <<EOF
import os, sys, urlparse
Expand Down

0 comments on commit 87fa376

Please sign in to comment.