mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
Fix upgrade
This commit is contained in:
parent
3ccb73b11d
commit
f631bf45a9
5 changed files with 22 additions and 5 deletions
|
@ -11,7 +11,10 @@
|
|||
setup_private=1
|
||||
setup_public=1
|
||||
upgrade=1
|
||||
# 2.98
|
||||
upgrade=1 from_commit=dab614bd7679f2f7978d1df2e360fba7ae0edfa4
|
||||
# 3.45
|
||||
upgrade=1 from_commit=ca58231e8488e09a2cb298f9c85e2f0387f238e6
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="mongodb mongodb-server mongo-tools"
|
||||
nodejs_version=12.15.0
|
||||
nodejsversion=12.15.0
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -75,7 +75,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
|||
#=================================================
|
||||
ynh_print_info --message="Installing dependencies..."
|
||||
|
||||
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
ynh_install_nodejs --nodejs_version=$nodejsversion
|
||||
ynh_use_nodejs
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
|
|
@ -84,7 +84,7 @@ find "$final_path" -type d -print0 | xargs -0 chmod 750
|
|||
ynh_print_info --message="Reinstalling dependencies..."
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
ynh_install_nodejs --nodejs_version=$nodejsversion
|
||||
ynh_use_nodejs
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
|
|
@ -73,15 +73,18 @@ ynh_abort_if_errors
|
|||
ynh_print_info --message="Managing upgrade from previous version..."
|
||||
|
||||
if ynh_version_gt "0.45-2" "${previous_version}" ; then
|
||||
ynh_print_info --message="Upgrading to 0.45-2..."
|
||||
ynh_replace_string --match_string="Environment=ROOT_URL=http://127.0.0.1:$port$path_url" --replace_string="Environment=ROOT_URL=https://$domain$path_url/" --target_file="/etc/systemd/system/$app.service"
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if ynh_version_gt "0.45-3" "${previous_version}" ; then
|
||||
ynh_print_info --message="Upgrading to 0.45-3..."
|
||||
yunohost service add $app
|
||||
fi
|
||||
|
||||
if ynh_version_gt "0.77-2" "${previous_version}" ; then
|
||||
ynh_print_info --message="Upgrading to 0.77-2..."
|
||||
ynh_install_nodejs --nodejs_version="8.9.3"
|
||||
ynh_use_nodejs
|
||||
|
||||
|
@ -96,6 +99,7 @@ if ynh_version_gt "0.77-2" "${previous_version}" ; then
|
|||
fi
|
||||
|
||||
if ynh_version_gt "1.07~ynh2" "${previous_version}" ; then
|
||||
ynh_print_info --message="Upgrading to 1.07~ynh2..."
|
||||
|
||||
# Replace mongodb packages
|
||||
# Assume no other app needs it >.>
|
||||
|
@ -115,6 +119,7 @@ if ynh_version_gt "1.07~ynh2" "${previous_version}" ; then
|
|||
fi
|
||||
|
||||
if ynh_version_gt "2.48~ynh1" "${previous_version}" ; then
|
||||
ynh_print_info --message="Upgrading to 2.48~ynh1..."
|
||||
# Install dependencies
|
||||
ynh_remove_nodejs
|
||||
ynh_install_nodejs --nodejs_version="8.16.0"
|
||||
|
@ -136,9 +141,10 @@ if ynh_version_gt "2.48~ynh1" "${previous_version}" ; then
|
|||
fi
|
||||
|
||||
if ynh_version_gt "3.55~ynh1" "${previous_version}" ; then
|
||||
ynh_print_info --message="Upgrading to 3.55~ynh1..."
|
||||
# Install dependencies
|
||||
ynh_remove_nodejs
|
||||
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
ynh_install_nodejs --nodejs_version=$nodejsversion
|
||||
ynh_use_nodejs
|
||||
|
||||
# Create a dedicated systemd config
|
||||
|
@ -157,6 +163,14 @@ if ynh_version_gt "3.55~ynh1" "${previous_version}" ; then
|
|||
ynh_store_file_checksum "$config_file"
|
||||
fi
|
||||
|
||||
if ynh_version_gt "3.79~ynh1" "${previous_version}" ; then
|
||||
ynh_print_info --message="Upgrading to 3.79~ynh1..."
|
||||
# Install dependencies
|
||||
ynh_remove_nodejs
|
||||
ynh_install_nodejs --nodejs_version=$nodejsversion
|
||||
ynh_use_nodejs
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CHECK THE PATH
|
||||
#=================================================
|
||||
|
@ -214,7 +228,7 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
ynh_print_info --message="Upgrading dependencies..."
|
||||
|
||||
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
ynh_install_nodejs --nodejs_version=$nodejsversion
|
||||
ynh_use_nodejs
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
|
Loading…
Reference in a new issue