From 24806047c3dd208a7bba17a94c0efef1bf7a4c9c Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sat, 25 Nov 2023 14:48:24 +0100 Subject: [PATCH 1/6] Update manifest.toml --- manifest.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 2f4f872..473ea98 100644 --- a/manifest.toml +++ b/manifest.toml @@ -48,7 +48,8 @@ ram.runtime = "50M" [resources.sources.main] url = "https://github.com/YunoHost-Apps/digisteps_ynh/releases/download/0.3.9/digisteps-v0.3.9.zip" sha256 = "cfd0723c29ae55d22496ae5db278c473f34daa64913835a1a7e3c431bfe99efc" - autoupdate.strategy = "latest_github_tag" + autoupdate.strategy = "latest_github_release" + autoupdate.asset = ".*.zip" [resources.system_user] From 5da54e44ba0677177b96fa0d382726d5ed78a837 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sat, 25 Nov 2023 17:23:11 +0100 Subject: [PATCH 2/6] Update manifest.toml --- manifest.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/manifest.toml b/manifest.toml index 473ea98..d753399 100644 --- a/manifest.toml +++ b/manifest.toml @@ -48,6 +48,7 @@ ram.runtime = "50M" [resources.sources.main] url = "https://github.com/YunoHost-Apps/digisteps_ynh/releases/download/0.3.9/digisteps-v0.3.9.zip" sha256 = "cfd0723c29ae55d22496ae5db278c473f34daa64913835a1a7e3c431bfe99efc" + autoupdate.upstream = "https://github.com/YunoHost-Apps/digisteps_ynh" autoupdate.strategy = "latest_github_release" autoupdate.asset = ".*.zip" From 46c790c6c4d56471b5c6275114733520d5400752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 14 Jan 2024 13:03:09 +0100 Subject: [PATCH 3/6] cleaning --- conf/nginx.conf | 1 - manifest.toml | 16 ++++------------ scripts/backup | 4 ---- scripts/install | 2 -- scripts/remove | 2 -- scripts/restore | 1 - scripts/upgrade | 35 +++-------------------------------- 7 files changed, 7 insertions(+), 54 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index efbc40c..82a7612 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,7 +6,6 @@ location __PATH__/ { #index index.php; - # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file client_max_body_size 50M; try_files $uri $uri/ index.php; diff --git a/manifest.toml b/manifest.toml index d753399..d8be3aa 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Digisteps" description.en = "Create simple online educational pathes" description.fr = "Créer des parcours pédagogiques simples en ligne" -version = "0.3.9~ynh1" +version = "0.5.13~ynh1" maintainers = ["Pierre-Amiel Giraud"] @@ -46,23 +46,15 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/YunoHost-Apps/digisteps_ynh/releases/download/0.3.9/digisteps-v0.3.9.zip" - sha256 = "cfd0723c29ae55d22496ae5db278c473f34daa64913835a1a7e3c431bfe99efc" - autoupdate.upstream = "https://github.com/YunoHost-Apps/digisteps_ynh" - autoupdate.strategy = "latest_github_release" - autoupdate.asset = ".*.zip" + url = "https://codeberg.org/ladigitale/digisteps/releases/download/0.5.13/digisteps-v0.5.13.zip" + sha256 = "8e78718848980991bda3e44147c8f7de70931970dc6253595f49d9471522a759" [resources.system_user] [resources.install_dir] - [resources.data_dir] - [resources.permissions] main.url = "/" [resources.apt] - packages = "mariadb-server, php8.2-sqlite3, php8.2-gd" - - [resources.database] - type = "mysql" + packages = "php8.2-sqlite3, php8.2-gd" diff --git a/scripts/backup b/scripts/backup index cc362c0..eedff3c 100644 --- a/scripts/backup +++ b/scripts/backup @@ -27,10 +27,6 @@ ynh_backup --src_path="$install_dir" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= diff --git a/scripts/install b/scripts/install index 4b5949b..dcb081f 100644 --- a/scripts/install +++ b/scripts/install @@ -25,10 +25,8 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=1 -# Create a dedicated NGINX config ynh_add_nginx_config -# Create a dedicated PHP-FPM config ynh_add_fpm_config #================================================= diff --git a/scripts/remove b/scripts/remove index 61db822..ac762c0 100644 --- a/scripts/remove +++ b/scripts/remove @@ -14,10 +14,8 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 -# Remove the dedicated NGINX config ynh_remove_nginx_config -# Remove the dedicated PHP-FPM config ynh_remove_fpm_config #================================================= diff --git a/scripts/restore b/scripts/restore index 9d33f02..908cf16 100644 --- a/scripts/restore +++ b/scripts/restore @@ -6,7 +6,6 @@ # IMPORT GENERIC HELPERS #================================================= -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers diff --git a/scripts/upgrade b/scripts/upgrade index 5d82b81..96211e8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,49 +18,20 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 - - # Test because file doesn’t exist at first install. It is created at first page opening. - if test -f "$install_dir/inc/digiwords.db" - then - # Create a temporary directory - tmpdir="$(mktemp -d)" - - # Backup the inc/digiwords.db file to the temp dir - cp -ar "$install_dir/inc/digiwords.db" "$tmpdir/digiwords.db" - - # 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 digiwords.db back to the install_dir - cp -ar "$tmpdir/digiwords.db" "$install_dir/inc/digiwords.db" - - # Remove the tmp directory securely - ynh_secure_remove --file="$tmpdir" - else - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" - fi -fi +ynh_setup_source --dest_dir="$install_dir" --keep="inc/digiwords.db" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # NGINX CONFIGURATION #================================================= ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 -# Create a dedicated NGINX config ynh_add_nginx_config -# Create a dedicated PHP-FPM config ynh_add_fpm_config #================================================= From 244d9733391f0f04d576c7821edf99d962dc60b1 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 14 Jan 2024 12:03:14 +0000 Subject: [PATCH 4/6] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1e55186..583467c 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Create simple online educational pathes -**Shipped version:** 0.3.9~ynh1 +**Shipped version:** 0.5.13~ynh1 **Demo:** https://ladigitale.dev/digisteps/#/ ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index 81e38be..aba7b91 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Create simple online educational pathes -**Version incluse :** 0.3.9~ynh1 +**Version incluse :** 0.5.13~ynh1 **Démo :** https://ladigitale.dev/digisteps/#/ ## Documentations et ressources From 76ae0909e06634befdf941d164f0b1f38ab59dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 14 Jan 2024 13:04:11 +0100 Subject: [PATCH 5/6] Update manifest.toml --- manifest.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index d8be3aa..8d2a0ca 100644 --- a/manifest.toml +++ b/manifest.toml @@ -27,7 +27,7 @@ ldap = false sso = false disk = "50M" -ram.build = "50M" +ram.build = "100M" ram.runtime = "50M" [install] @@ -39,8 +39,6 @@ ram.runtime = "50M" default = "/digisteps" [install.init_main_permission] - help.en = "If public, any visitor can create educational pathes and see saved ones, providing they know their secret questions and answers." - help.fr = "Si l’application est publique, n’importe quel visiteur pourra créer un parcours pédagogique et consulter ceux sauvegardés dont ils connaissent à la fois la question secrète et la réponse." type = "group" default = "visitors" From 3ac7c7d0f3f52c204521325c32d69640a9fac8ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 14 Jan 2024 13:04:52 +0100 Subject: [PATCH 6/6] Update install --- scripts/install | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install b/scripts/install index dcb081f..ae8982d 100644 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir"