run collectstatic

This commit is contained in:
Kenneth Reitz
2012-05-29 21:08:34 -04:00
parent cf5a9d26d1
commit a21dbc2da1
+20 -8
View File
@@ -2,13 +2,25 @@
set +e
# Compile assets.
echo "-----> Collecting static files"
python $PROJECT/manage.py collectstatic --noinput | indent
# Check if collectstatic is configured.
python $PROJECT/manage.py collectstatic --help &> /dev/null && RUN_COLLECTSTATIC=true
[ $? -ne 0 ] && {
echo " ! Error running manage.py collectstatic. More info:"
echo " ! http://devcenter.heroku.com/articles/django-assets"
}
# Don't raise errors if SILENCE_COLLECTSTATIC is set.
if [ ! "$SILENCE_COLLECTSTATIC" ]]; then
set -e
fi
# Compile assets if collectstatic appears to be .
if [ "$RUN_COLLECTSTATIC" ]; then
echo "-----> Collecting static files"
python $PROJECT/manage.py collectstatic --noinput | 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
set -e