From 4dea56d4a05dce5deb49ec3fdbe957c665330823 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 31 May 2012 01:49:13 -0400 Subject: [PATCH] better collectstatic pre-check --- 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 2a0a801..0b90dd1 100755 --- a/bin/steps/django/collectstatic +++ b/bin/steps/django/collectstatic @@ -8,14 +8,11 @@ indent() { [ $(uname) == "Darwin" ] && sed -l "$RE" || sed -u "$RE" } - # Check if collectstatic is configured. -python $MANAGE_FILE collectstatic --help &> /dev/null && RUN_COLLECTSTATIC=true - -# Don't raise errors if SILENCE_COLLECTSTATIC is set. +python $MANAGE_FILE collectstatic --dry-run &> /dev/null && RUN_COLLECTSTATIC=true echo "-----> Collecting static files" -set -e + # Compile assets if collectstatic appears to be kosher. if [ "$RUN_COLLECTSTATIC" ]; then @@ -24,7 +21,7 @@ if [ "$RUN_COLLECTSTATIC" ]; then [ $? -ne 0 ] && { echo " ! Error running manage.py collectstatic. More info:" echo " http://devcenter.heroku.com/articles/django-assets" - # exit 1 + exit 1 } else