mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
Factorize pip stuff
between install and upgrade
This commit is contained in:
parent
cfd7b769d4
commit
19bede5ab0
3 changed files with 10 additions and 6 deletions
|
@ -40,6 +40,14 @@ init_virtualenv () {
|
|||
/opt/yunohost/ihatemoney/venv/bin/pip install 'setuptools>=18.5'
|
||||
}
|
||||
|
||||
pip_install () {
|
||||
sudo /opt/yunohost/ihatemoney/venv/bin/pip install --upgrade \
|
||||
'gunicorn>=19.3.0' \
|
||||
'PyMySQL>=0.9,<0.10' \
|
||||
'ihatemoney>=3,<4' \
|
||||
|
||||
}
|
||||
|
||||
configure_nginx () {
|
||||
local domain=$1
|
||||
local path=$2
|
||||
|
|
|
@ -43,10 +43,7 @@ create_unix_user
|
|||
|
||||
# Prepare venv
|
||||
init_virtualenv
|
||||
sudo /opt/yunohost/ihatemoney/venv/bin/pip install \
|
||||
'gunicorn>=19.3.0' \
|
||||
'PyMySQL>=0.9,<0.10' \
|
||||
'ihatemoney>=3,<4' \
|
||||
pip_install
|
||||
|
||||
create_system_dirs
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
|
||||
# Installation paths
|
||||
INSTALL_DIR=/opt/yunohost/ihatemoney
|
||||
PIP=${INSTALL_DIR}/venv/bin/pip
|
||||
|
||||
# Source YunoHost helpers
|
||||
. /usr/share/yunohost/helpers
|
||||
|
@ -85,7 +84,7 @@ fi
|
|||
|
||||
|
||||
# Upgrade code and dependencies
|
||||
sudo ${PIP} install --upgrade 'gunicorn>=19.3.0' PyMySQL 'ihatemoney>=3,<4'
|
||||
pip_install
|
||||
|
||||
|
||||
#-----------------------POST-UPGRADE MIGRATIONS-----------------
|
||||
|
|
Loading…
Add table
Reference in a new issue