From 5ea843458a4b008b706342b2052a83174e41f715 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz <me@kennethreitz.com> Date: Wed, 2 Apr 2014 13:37:19 -0400 Subject: [PATCH] improved collectstatic experience --- bin/steps/collectstatic | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/steps/collectstatic b/bin/steps/collectstatic index ad6fdca2..41f2e919 100755 --- a/bin/steps/collectstatic +++ b/bin/steps/collectstatic @@ -10,19 +10,23 @@ MANAGE_FILE=${MANAGE_FILE:-fakepath} if [ ! "$DISABLE_COLLECTSTATIC" ] && [ -f "$MANAGE_FILE" ]; then set +e + echo "-----> Preparing static assets" # Check if collectstatic is configured properly. python $MANAGE_FILE collectstatic --dry-run --noinput &> /dev/null && RUN_COLLECTSTATIC=true # Compile assets if collectstatic appears to be kosher. if [ "$RUN_COLLECTSTATIC" ]; then - echo "-----> Collecting static files" + echo " Running collectstatic..." python $MANAGE_FILE collectstatic --noinput 2>&1 | sed '/^Copying/d;/^$/d;/^ /d' | indent [ $? -ne 0 ] && { - echo " ! Error running manage.py collectstatic. More info:" + echo " ! Error running 'manage.py collectstatic'. More info:" echo " http://devcenter.heroku.com/articles/django-assets" } + else + echo " ! Error running 'manage.py collectstatic --dry-run'. More info:" + echo " http://devcenter.heroku.com/articles/django-assets" fi echo -- GitLab