Skip to content
Snippets Groups Projects
Commit 87fa376b authored by Kenneth Reitz's avatar Kenneth Reitz
Browse files

checked in virtualenv safety check

parent 46de6fc6
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,12 @@ if [ "$NAME" = "Python" ]; then ...@@ -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; } [ -f manage.py ] && [ -f settings.py ] && { echo " ! Django app must be in a package subdirectory"; exit 1; }
fi 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 # copy artifacts out of cache if exists
mkdir -p $CACHE_DIR mkdir -p $CACHE_DIR
for dir in $VIRTUALENV_DIRS; do for dir in $VIRTUALENV_DIRS; do
...@@ -49,7 +55,7 @@ if [ "$NAME" = "Python/Django" ]; then ...@@ -49,7 +55,7 @@ if [ "$NAME" = "Python/Django" ]; then
SETTINGS_FILE=$(ls **/settings.py | head -1) SETTINGS_FILE=$(ls **/settings.py | head -1)
PROJECT=$(dirname $SETTINGS_FILE) PROJECT=$(dirname $SETTINGS_FILE)
echo "Injecting code into $SETTINGS_FILE to read from DATABASE_URL" | indent echo "Injecting code into $SETTINGS_FILE to read from DATABASE_URL" | indent
cat >>$SETTINGS_FILE <<EOF cat >>$SETTINGS_FILE <<EOF
import os, sys, urlparse import os, sys, urlparse
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment