From 795272d625564376dddedaadbf9538ef2b202863 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 31 May 2012 20:29:14 -0400 Subject: [PATCH] only talk about static files when configured --- bin/steps/django/collectstatic | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/steps/django/collectstatic b/bin/steps/django/collectstatic index 80cacdc..44346e2 100755 --- a/bin/steps/django/collectstatic +++ b/bin/steps/django/collectstatic @@ -8,23 +8,20 @@ indent() { [ $(uname) == "Darwin" ] && sed -l "$RE" || sed -u "$RE" } + # Check if collectstatic is configured properly. python $MANAGE_FILE collectstatic --dry-run --noinput &> /dev/null && RUN_COLLECTSTATIC=true -echo "-----> Collecting static files" - # Compile assets if collectstatic appears to be kosher. if [ "$RUN_COLLECTSTATIC" ]; then + + echo "-----> Collecting static files" python $MANAGE_FILE collectstatic --noinput 2>&1 | sed '/^Copying/d;/^$/d;/^ /d' | indent [ $? -ne 0 ] && { echo " ! Error running manage.py collectstatic. More info:" echo " http://devcenter.heroku.com/articles/django-assets" } - -else - echo " Django collecstatic is not configured. Learn more:" - echo " http://devcenter.heroku.com/articles/django-assets" fi echo