File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33set +e
44
5- # Compile assets.
6- echo " -----> Collecting static files"
7- python $PROJECT /manage.py collectstatic --noinput | indent
5+ # Check if collectstatic is configured.
6+ python $PROJECT /manage.py collectstatic --help & > /dev/null && RUN_COLLECTSTATIC=true
87
9- [ $? -ne 0 ] && {
10- echo " ! Error running manage.py collectstatic. More info:"
11- echo " ! http://devcenter.heroku.com/articles/django-assets"
12- }
8+ # Don't raise errors if SILENCE_COLLECTSTATIC is set.
9+ if [ ! " $SILENCE_COLLECTSTATIC " ]]; then
10+ set -e
11+ fi
12+
13+ # Compile assets if collectstatic appears to be .
14+ if [ " $RUN_COLLECTSTATIC " ]; then
15+ echo " -----> Collecting static files"
16+ python $PROJECT /manage.py collectstatic --noinput | indent
17+
18+ [ $? -ne 0 ] && {
19+ echo " ! Error running manage.py collectstatic. More info:"
20+ echo " http://devcenter.heroku.com/articles/django-assets"
21+ }
22+ else
23+ echo " ! Django collecstatic is not configured. Learn more:"
24+ echo " http://devcenter.heroku.com/articles/django-assets"
25+ fi
1326
14- set -e
You can’t perform that action at this time.
0 commit comments