Skip to content

Commit 20249f9

Browse files
author
Kenneth Reitz
committed
MANAGE_FILE
1 parent 8b55e73 commit 20249f9

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

bin/release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ EOF
2121

2222
[ "$NAME" = "Python/Django" ] || exit 0
2323

24-
MANAGE_FILE=$(cd $BUILD_DIR && find . -maxdepth 2 -type f -name 'manage.py' | head -1)
24+
MANAGE_FILE=$(cd $BUILD_DIR && find . -maxdepth 3 -type f -name 'manage.py' | head -1)
2525
MANAGE_FILE=${MANAGE_FILE:2}
2626
PROJECT=$(dirname $MANAGE_FILE)
2727

bin/steps/django/collectstatic

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
set +e
44

55
# Check if collectstatic is configured.
6-
python $PROJECT/manage.py collectstatic --help &> /dev/null && RUN_COLLECTSTATIC=true
6+
python $MANAGE_FILE collectstatic --help &> /dev/null && RUN_COLLECTSTATIC=true
77

88
# Don't raise errors if SILENCE_COLLECTSTATIC is set.
99
if [ ! "$SILENCE_COLLECTSTATIC" ]; then
1010
set -e
1111
fi
1212

13-
# Compile assets if collectstatic appears to be .
13+
# Compile assets if collectstatic appears to be kosher.
1414
if [ "$RUN_COLLECTSTATIC" ]; then
1515
echo "-----> Collecting static files"
16-
python $PROJECT/manage.py collectstatic --noinput --verbosity=0 | indent
16+
python $MANAGE_FILE collectstatic --noinput --verbosity=0 | indent
1717

1818
[ $? -ne 0 ] && {
1919
echo " ! Error running manage.py collectstatic. More info:"
@@ -22,6 +22,4 @@ if [ "$RUN_COLLECTSTATIC" ]; then
2222
else
2323
echo " ! Django collecstatic is not configured. Learn more:"
2424
echo " http://devcenter.heroku.com/articles/django-assets"
25-
fi
26-
27-
env
25+
fi

bin/steps/django/init

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
SETTINGS_FILE=$(find . -maxdepth 3 -type f -name 'settings.py' | head -1)
44
PROJECT=$(dirname $SETTINGS_FILE)
5+
MANAGE_FILE=$(find . -maxdepth 3 -type f -name 'manage.py' | head -1)
6+
MANAGE_FILE=${MANAGE_FILE:2}
57

68
# Disable injection for new applications.
79
if [ -f .heroku/injection_disabled ]; then
810
DISABLE_INJECTION=1
911
fi
1012

11-
export SETTINGS_FILE PROJECT DISABLE_INJECTION
13+
export SETTINGS_FILE MANAGE_FILE PROJECT DISABLE_INJECTION
1214

1315
if [ ! "$DISABLE_INJECTION" ]; then
1416
source $BIN_DIR/steps/django/injection

0 commit comments

Comments
 (0)