mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
check for django in requirements.txt
This commit is contained in:
+3
-1
@@ -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.
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user