From 90edd88b227ca0338856fcef59d78d888b81fe70 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz <me@kennethreitz.org> Date: Mon, 8 Feb 2016 20:30:39 -0500 Subject: [PATCH] cleanup collectstatic stuff, before release --- bin/steps/collectstatic | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/bin/steps/collectstatic b/bin/steps/collectstatic index 7ebe5b6f..60ef95dd 100755 --- a/bin/steps/collectstatic +++ b/bin/steps/collectstatic @@ -27,7 +27,7 @@ bpwatch start collectstatic # metrics collection if [ ! "$DISABLE_COLLECTSTATIC" ] && [ -f "$MANAGE_FILE" ] && [ "$DJANGO_INSTALLED" ]; then set +e - echo "-----> Preparing static assets with 'collectstatic'" + echo "-----> $ python $MANAGE_FILE collectstatic --noinput" # Run collectstatic, cleanup some of the noisy output. python $MANAGE_FILE collectstatic --noinput --traceback 2>&1 | sed '/^Post-processed/d;/^Copying/d;/^$/d' | indent @@ -37,10 +37,17 @@ if [ ! "$DISABLE_COLLECTSTATIC" ] && [ -f "$MANAGE_FILE" ] && [ "$DJANGO_INSTALL # Display a warning if collectstatic failed. [ $COLLECTSTATIC_STATUS -ne 0 ] && { + + echo + echo " ! Error while running '$ python $MANAGE_FILE collectstatic --noinput'." + echo " See traceback above for details." + echo + echo " You may need to update application code to resolve this error." + echo " Or, you can disable collectstatic for this application:" + echo + echo " $ heroku config:set DISABLE_COLLECTSTATIC=1" echo - echo " ! Error while runnning '$ python $MANAGE_FILE collectstatic --noinput'." - echo " See traceback above for more details." - echo " More info: http://devcenter.heroku.com/articles/django-assets" + echo " http://devcenter.heroku.com/articles/django-assets" # Additionally, dump out the environment, if debug mode is on. if [ "$DEBUG_COLLECTSTATIC" ]; then -- GitLab