Skip to content
Snippets Groups Projects
Commit 20249f96 authored by Kenneth Reitz's avatar Kenneth Reitz
Browse files

MANAGE_FILE

parent 8b55e73f
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ EOF
[ "$NAME" = "Python/Django" ] || exit 0
MANAGE_FILE=$(cd $BUILD_DIR && find . -maxdepth 2 -type f -name 'manage.py' | head -1)
MANAGE_FILE=$(cd $BUILD_DIR && find . -maxdepth 3 -type f -name 'manage.py' | head -1)
MANAGE_FILE=${MANAGE_FILE:2}
PROJECT=$(dirname $MANAGE_FILE)
......
......@@ -3,17 +3,17 @@
set +e
# Check if collectstatic is configured.
python $PROJECT/manage.py collectstatic --help &> /dev/null && RUN_COLLECTSTATIC=true
python $MANAGE_FILE collectstatic --help &> /dev/null && RUN_COLLECTSTATIC=true
# Don't raise errors if SILENCE_COLLECTSTATIC is set.
if [ ! "$SILENCE_COLLECTSTATIC" ]; then
set -e
fi
# Compile assets if collectstatic appears to be .
# Compile assets if collectstatic appears to be kosher.
if [ "$RUN_COLLECTSTATIC" ]; then
echo "-----> Collecting static files"
python $PROJECT/manage.py collectstatic --noinput --verbosity=0 | indent
python $MANAGE_FILE collectstatic --noinput --verbosity=0 | indent
[ $? -ne 0 ] && {
echo " ! Error running manage.py collectstatic. More info:"
......@@ -22,6 +22,4 @@ if [ "$RUN_COLLECTSTATIC" ]; then
else
echo " ! Django collecstatic is not configured. Learn more:"
echo " http://devcenter.heroku.com/articles/django-assets"
fi
env
\ No newline at end of file
fi
\ No newline at end of file
......@@ -2,13 +2,15 @@
SETTINGS_FILE=$(find . -maxdepth 3 -type f -name 'settings.py' | head -1)
PROJECT=$(dirname $SETTINGS_FILE)
MANAGE_FILE=$(find . -maxdepth 3 -type f -name 'manage.py' | head -1)
MANAGE_FILE=${MANAGE_FILE:2}
# Disable injection for new applications.
if [ -f .heroku/injection_disabled ]; then
DISABLE_INJECTION=1
fi
export SETTINGS_FILE PROJECT DISABLE_INJECTION
export SETTINGS_FILE MANAGE_FILE PROJECT DISABLE_INJECTION
if [ ! "$DISABLE_INJECTION" ]; then
source $BIN_DIR/steps/django/injection
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment