From 597427e37e1afde0272605a51536db6532d8690e Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 4 Jun 2024 22:54:10 +0200 Subject: [PATCH] Upgrade (#104) * Update upgrade * Auto-update READMEs --------- Co-authored-by: yunohost-bot --- ALL_README.md | 2 +- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- manifest.toml | 2 +- scripts/upgrade | 31 +++---------------------------- 9 files changed, 11 insertions(+), 36 deletions(-) diff --git a/ALL_README.md b/ALL_README.md index 8938aae..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,7 +1,7 @@ # All available README files by language - [Read the README in English](README.md) -- [Lee el README en español](README_es.md) +- [Lea el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) diff --git a/README.md b/README.md index 18dd9c6..098b164 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Moodle is a learning platform designed to provide educators, administrators and learners with a single robust, secure and integrated system to create personalised learning environments. Moodle is widely used around the world by universities, schools, companies and all manner of organisations and individuals. -**Shipped version:** 4.4.0~ynh1 +**Shipped version:** 4.4.0~ynh2 **Demo:** diff --git a/README_es.md b/README_es.md index 5533aa1..9d5d6e3 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Moodle is a learning platform designed to provide educators, administrators and learners with a single robust, secure and integrated system to create personalised learning environments. Moodle is widely used around the world by universities, schools, companies and all manner of organisations and individuals. -**Versión actual:** 4.4.0~ynh1 +**Versión actual:** 4.4.0~ynh2 **Demo:** diff --git a/README_eu.md b/README_eu.md index 1dbd186..2a27fa2 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Moodle is a learning platform designed to provide educators, administrators and learners with a single robust, secure and integrated system to create personalised learning environments. Moodle is widely used around the world by universities, schools, companies and all manner of organisations and individuals. -**Paketatutako bertsioa:** 4.4.0~ynh1 +**Paketatutako bertsioa:** 4.4.0~ynh2 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 81b09e0..442e4e3 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Moodle est une plateforme d'apprentissage conçue pour fournir aux éducateurs, administrateurs et apprenants un système unique robuste, sécurisé et intégré pour créer des environnements d'apprentissage personnalisés. Moodle est largement utilisé dans le monde entier par les universités, les écoles, les entreprises et toutes sortes d'organisations et d'individus. -**Version incluse :** 4.4.0~ynh1 +**Version incluse :** 4.4.0~ynh2 **Démo :** diff --git a/README_gl.md b/README_gl.md index 545c265..fce48de 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Moodle is a learning platform designed to provide educators, administrators and learners with a single robust, secure and integrated system to create personalised learning environments. Moodle is widely used around the world by universities, schools, companies and all manner of organisations and individuals. -**Versión proporcionada:** 4.4.0~ynh1 +**Versión proporcionada:** 4.4.0~ynh2 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 81ca361..e049cae 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Moodle is a learning platform designed to provide educators, administrators and learners with a single robust, secure and integrated system to create personalised learning environments. Moodle is widely used around the world by universities, schools, companies and all manner of organisations and individuals. -**分发版本:** 4.4.0~ynh1 +**分发版本:** 4.4.0~ynh2 **演示:** diff --git a/manifest.toml b/manifest.toml index 0592288..f86baed 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Moodle" description.en = "Online learning platform" description.fr = "Plateforme d'apprentissage en ligne" -version = "4.4.0~ynh1" +version = "4.4.0~ynh2" maintainers = [] diff --git a/scripts/upgrade b/scripts/upgrade index 091bb9b..5148a84 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -54,29 +48,10 @@ fi #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=6 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=6 - - # Create a temporary directory - tmpdir="$(mktemp -d)" - - # Backup the config file in the temp dir - cp -a "$install_dir/config.php" "$tmpdir/config.php" - - # Remove the app directory securely - ynh_secure_remove --file="$install_dir" - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" - - # Copy the admin saved settings from tmp directory to final path - cp -a "$tmpdir/config.php" "$install_dir/config.php" - - # Remove the tmp directory securely - ynh_secure_remove --file="$tmpdir" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config.php" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir"