Fix `deploy.sh` script.

This commit is contained in:
Santiago L 2021-02-19 12:25:04 +01:00
parent 9957b4ebeb
commit 8079de4e76
1 changed files with 29 additions and 28 deletions

View File

@ -46,7 +46,7 @@ function install_orchestra () {
if [[ $dev ]]; then
# Install from source
python_path=$(python3 -c "import sys; print([path for path in sys.path if path.startswith('/usr/local/lib/python')][1]);")
python_path=$(python3 -c "import sys; print([path for path in sys.path if path.startswith('/usr/local/lib/python')][0]);")
if [[ -d $python_path/orchestra ]]; then
run sudo rm -fr $python_path/orchestra
fi
@ -57,7 +57,8 @@ function install_orchestra () {
run sudo mkdir -p /usr/share/man/man7
run sudo apt-get update
run sudo apt-get -y install git python3-pip
surun "git clone $repo $home/django-orchestra" || {
# TODO(@slamora) remove `-b dev/github-actions` before merging to master
surun "git clone -b dev/github-actions $repo $home/django-orchestra" || {
# Finishing partial installation
surun "export GIT_DIR=$home/django-orchestra/.git; git pull"
}
@ -82,7 +83,7 @@ function setup_database () {
dev=$1
noinput=$2
run sudo apt-get install -y postgresql
run sudo pip install psycopg2
run sudo pip3 install psycopg2-binary
# Setup Database
if [[ $dev ]]; then
# Speeding up tests, don't do this in production!