From 88917eda9db3b10e8ff4daa88833b58aab2c0c7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 22 Jan 2018 16:51:41 +0100 Subject: [PATCH] Fix upgrade --- scripts/_common.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index d1f7be4..60f64a5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -10,6 +10,8 @@ get_app_version_from_json() { echo $(grep '\"version\": ' "$manifest_path" | cut -d '"' -f 4) # Retrieve the version number in the manifest file. } APP_VERSION=$(get_app_version_from_json) +app_main_version=$(echo $APP_VERSION | cut -d'-' -f1) +app_sub_version=$(echo $APP_VERSION | cut -d'-' -f2) install_dependance() { ynh_install_app_dependencies python-pip build-essential python-dev python-virtualenv postgresql uwsgi uwsgi-plugin-python expect @@ -40,7 +42,7 @@ install_source() { cp ../conf/virtualenv_activate $final_path/bin/activate source $final_path/bin/activate pip install --upgrade pip - pip install --upgrade https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v2.0/pip/pgadmin${APP_VERSION}-py2.py3-none-any.whl + pip install --upgrade https://ftp.postgresql.org/pub/pgadmin/pgadmin$app_main_version/v$app_sub_version/pip/pgadmin${APP_VERSION}-py2.py3-none-any.whl deactivate fi }