diff --git a/bin/release b/bin/release index 9fb30e167981dd78a663bba2e7a8d4821592a223..9bc9a336aa04fd88be793c8408cbd0367596861f 100755 --- a/bin/release +++ b/bin/release @@ -21,7 +21,7 @@ EOF [ "$NAME" = "Python/Django" ] || exit 0 -MANAGE_FILE=$(cd $BUILD_DIR && find . -maxdepth 2 -type f -name 'manage.py' | head -1) +MANAGE_FILE=$(cd $BUILD_DIR && find . -maxdepth 3 -type f -name 'manage.py' | head -1) MANAGE_FILE=${MANAGE_FILE:2} PROJECT=$(dirname $MANAGE_FILE) diff --git a/bin/steps/django/collectstatic b/bin/steps/django/collectstatic index a5806f53649b29e19c456638fef01aa7b0e1a14f..70dc3fb8b2ca6926fef0d9ec11bfe991a01dda90 100755 --- a/bin/steps/django/collectstatic +++ b/bin/steps/django/collectstatic @@ -3,17 +3,17 @@ set +e # Check if collectstatic is configured. -python $PROJECT/manage.py collectstatic --help &> /dev/null && RUN_COLLECTSTATIC=true +python $MANAGE_FILE collectstatic --help &> /dev/null && RUN_COLLECTSTATIC=true # Don't raise errors if SILENCE_COLLECTSTATIC is set. if [ ! "$SILENCE_COLLECTSTATIC" ]; then set -e fi -# Compile assets if collectstatic appears to be . +# Compile assets if collectstatic appears to be kosher. if [ "$RUN_COLLECTSTATIC" ]; then echo "-----> Collecting static files" - python $PROJECT/manage.py collectstatic --noinput --verbosity=0 | indent + python $MANAGE_FILE collectstatic --noinput --verbosity=0 | indent [ $? -ne 0 ] && { echo " ! Error running manage.py collectstatic. More info:" @@ -22,6 +22,4 @@ if [ "$RUN_COLLECTSTATIC" ]; then else echo " ! Django collecstatic is not configured. Learn more:" echo " http://devcenter.heroku.com/articles/django-assets" -fi - -env \ No newline at end of file +fi \ No newline at end of file diff --git a/bin/steps/django/init b/bin/steps/django/init index 8200263322c9568777864e3b729cd6315d1bcf4d..bd40a397d74198b630cafbc1b73c85b78a80632c 100755 --- a/bin/steps/django/init +++ b/bin/steps/django/init @@ -2,13 +2,15 @@ SETTINGS_FILE=$(find . -maxdepth 3 -type f -name 'settings.py' | head -1) PROJECT=$(dirname $SETTINGS_FILE) +MANAGE_FILE=$(find . -maxdepth 3 -type f -name 'manage.py' | head -1) +MANAGE_FILE=${MANAGE_FILE:2} # Disable injection for new applications. if [ -f .heroku/injection_disabled ]; then DISABLE_INJECTION=1 fi -export SETTINGS_FILE PROJECT DISABLE_INJECTION +export SETTINGS_FILE MANAGE_FILE PROJECT DISABLE_INJECTION if [ ! "$DISABLE_INJECTION" ]; then source $BIN_DIR/steps/django/injection