diff --git a/bin/compile b/bin/compile index eb4eeb443d71b90c0974e7c1a4894b686d8246c2..4157b76a8ed0b36dd8c234e33834e26aef8d0517 100755 --- a/bin/compile +++ b/bin/compile @@ -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. diff --git a/bin/detect b/bin/detect index 1d7041c500b0d31d5336a8c13c4dc939acf6f90d..c9db66dde192de5f1cca132eb4d4e29d65fc5691 100755 --- a/bin/detect +++ b/bin/detect @@ -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