Commit a0f2073e authored by Kenneth Reitz's avatar Kenneth Reitz

check for django in requirements.txt

parent 1b0fd2e4
......@@ -34,7 +34,9 @@ cd $BUILD_DIR
# Reject a non-packaged Django app.
if [ "$NAME" = "Python" ]; then
[ -f manage.py ] && [ -f settings.py ] && { echo " ! Django app must be in a package subdirectory"; exit 1; }
[ -f settings.py ] && { echo " ! Django settings must be in a package subdirectory"; exit 1; }
(grep -Fiq "django" requirements.txt) && [ -f settings.py ] && { echo " ! Django app must be in a package subdirectory"; exit 1; }
fi
# Warn a checked-in virtualenv.
......
......@@ -3,9 +3,9 @@
BUILD_DIR=$1
if [ -f $BUILD_DIR/requirements.txt ] || [ -f $BUILD_DIR/setup.py ]; then
if [ ! -f $BUILD_DIR/requirements.txt ] || [ ! -f $BUILD_DIR/setup.py ]; then
exit 1
fi
# 'Python/Django' if there is a [mysite]/settings.py file present; otherwise 'Python'
ls $BUILD_DIR/**/settings.py &> /dev/null && echo Python/Django || echo Python
ls $BUILD_DIR/**/settings.py &> /dev/null && (grep -Fiq "django" requirements.txt) && echo Python/Django || echo Python
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