X-Git-Url: https://git.mdrn.pl/fnp-django-template.git/blobdiff_plain/6f10938138ff6017779d03be24c7ed012dbc90a9..refs/heads/master:/bootstrap.sh diff --git a/bootstrap.sh b/bootstrap.sh index 0059599..36d799d 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -8,7 +8,7 @@ # Make it a function, so that it works with `source` start_project() { -local DJANGO_REQ='Django>=1.7,<1.8' +local DJANGO_REQ='Django>=1.8,<1.9' local DJANGO_ROOT='src' local PYPI='https://py.mdrn.pl:8443/simple' local DEFAULT_PYTHON="`which python3.4`" @@ -89,7 +89,7 @@ echo -e "${strong}Downloading project template...${normal}" if [[ "$FNP_PROJECT_TEMPLATE" =~ ^(https?|ftp):// ]]; then local PROJECT_TMPDIR=`mktemp -d fnp-django-template-XXX` curl "$FNP_PROJECT_TEMPLATE" | tar xzf - -C "$PROJECT_TMPDIR" - local TEMPLATE="$PROJECT_TMPDIR"/fnp-django-template-*/src + local TEMPLATE=("$PROJECT_TMPDIR"/fnp-django-template-*/src) else local TEMPLATE="$FNP_PROJECT_TEMPLATE" fi @@ -109,13 +109,14 @@ cd "$PROJECT" chmod +x "$DJANGO_ROOT"/manage.py mv _gitignore .gitignore +cp etc/local_settings.py.sample etc/local_settings.py +cp etc/local_settings_test.py.sample etc/local_settings_test.py +ln -s ../../../etc/local_settings.py ../../../etc/local_settings_test.py $DJANGO_ROOT/$PROJECT/settings/ echo -e "${strong}Installing requirements...${normal}" -pip install -i "$PYPI" -r requirements.txt -echo -e "${strong}Installing developer requirements...${normal}" -pip install -i "$PYPI" -r requirements-dev.txt -echo -e "${strong}Running syncdb...${normal}" -"$DJANGO_ROOT"/manage.py syncdb --noinput +pip install -i "$PYPI" -r requirements/dev.txt +echo -e "${strong}Running migrate...${normal}" +"$DJANGO_ROOT"/manage.py migrate #--noinput echo -e "${strong}Starting new git repository...${normal}" git init