diff --git a/anytask/generate_test_db.sh b/anytask/generate_test_db.sh deleted file mode 100755 index 1620d05f7..000000000 --- a/anytask/generate_test_db.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -[[ -f sqlite3.db ]] && echo "sqlite3.db already exists!" && exit 1 - -./manage.py migrate --no-input -./manage.py createsuperuser --username=anytask --email=anytask@yandex.ru --noinput -echo 'from django.contrib.auth.models import User ; user=User.objects.get(username="anytask") ; user.set_password("pass") ; user.save() ; print "Password changed"' | ./manage.py shell --plain diff --git a/deploy_local_beta/deploy_local_beta_python2.sh b/deploy_local_beta/deploy_local_beta_python2.sh index dff131472..494614765 100644 --- a/deploy_local_beta/deploy_local_beta_python2.sh +++ b/deploy_local_beta/deploy_local_beta_python2.sh @@ -34,7 +34,6 @@ pip install -r requirements_local.txt ANYBETA_report ANYBETA_report "Manage django project" python setup.py develop -python ./anytask/manage.py migrate --noinput # CREATE DB @@ -42,13 +41,11 @@ python ./anytask/manage.py migrate --noinput ANYBETA_report ANYBETA_report "Create test database" -if test -e ./anytask/sqlite3.db -then - rm ./anytask/sqlite3.db -fi -./anytask/generate_test_db.sh -./anytask/manage.py create_test_data.sh - +$ANYBETA_DEPLOY/generate_test_db.sh +$ANYBETA_ROOT/anytask/manage.py create_test_data +ANYBETA_report +ANYBETA_report "Deploy completed!" +ANYBETA_report "You can now start django server using ${ANYBETA_ROOT}/anytask/manage.py runserver" fi diff --git a/deploy_local_beta/generate_test_db.sh b/deploy_local_beta/generate_test_db.sh new file mode 100644 index 000000000..6fe4f61ce --- /dev/null +++ b/deploy_local_beta/generate_test_db.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if test -e $ANYBETA_ROOT/sqlite3.db +then + rm $ANYBETA_ROOT/sqlite3.db +fi +$ANYBETA_ROOT/anytask/manage.py migrate --no-input +$ANYBETA_ROOT/anytask/manage.py createsuperuser --username=anytask --email=anytask@yandex.ru --noinput +echo 'from django.contrib.auth.models import User ; user=User.objects.get(username="anytask") ; user.set_password("pass") ; user.save() ; print "Password changed"' | $ANYBETA_ROOT/anytask/manage.py shell --plain + +ANYBETA_report "anytask pass"