1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/chitchatter_ynh.git synced 2024-09-03 18:15:59 +02:00
This commit is contained in:
Éric Gaspar 2024-06-16 09:20:10 +02:00
parent f41ca98632
commit 00e51517af
2 changed files with 8 additions and 23 deletions

View file

@ -17,11 +17,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." --
# Remove the dedicated NGINX config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
ynh_remove_nodejs ynh_remove_nodejs
#================================================= #=================================================

View file

@ -9,29 +9,19 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..." --weight=5
if [ "$upgrade_type" == "UPGRADE_APP" ] pushd $install_dir
then chown -R $app:www-data "$install_dir"
ynh_script_progression --message="Upgrading source files..." --weight=5 git config --system --add safe.directory $install_dir
pushd $install_dir
chown -R $app:www-data "$install_dir"
git config --system --add safe.directory $install_dir
ynh_exec_as $app git fetch ynh_exec_as $app git fetch
ynh_exec_as $app git reset --hard --quiet $version_commit ynh_exec_as $app git reset --hard --quiet $version_commit
ynh_exec_as $app git pull ynh_exec_as $app git pull
popd popd
fi
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"