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

move django pre-exit to steps/django

parent daa85630
No related branches found
No related tags found
No related merge requests found
...@@ -96,9 +96,6 @@ if [ ! -f requirements.txt ]; then ...@@ -96,9 +96,6 @@ if [ ! -f requirements.txt ]; then
echo "-e ." > requirements.txt echo "-e ." > requirements.txt
fi fi
# Reject a Django app that appears to be packaged incorrectly.
grep -Fiq "django" requirements.txt) && [ -f settings.py ] && { puts-warn "Django app must be in a package subdirectory"; exit 1; }
# ### The Cache # ### The Cache
mkdir -p $CACHE_DIR mkdir -p $CACHE_DIR
......
...@@ -9,8 +9,18 @@ ...@@ -9,8 +9,18 @@
# #
# This script is invoked by [`bin/compile`](/). # This script is invoked by [`bin/compile`](/).
# ## Sanity Checks
#
# Reject a Django app that appears to be packaged incorrectly.
if [ -f settings.py ]; then
echo " ! Django app must be in a package subdirectory"
exit 1
fi
echo "-----> Injecting Django settings..." echo "-----> Injecting Django settings..."
SETTINGS_FILE=$(find . -maxdepth 2 -type f -name 'settings.py' | head -1) SETTINGS_FILE=$(find . -maxdepth 2 -type f -name 'settings.py' | head -1)
PROJECT=$(dirname $SETTINGS_FILE) PROJECT=$(dirname $SETTINGS_FILE)
......
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