From 9d8e07831b658271810e613671970e357cbc497b Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Sun, 5 Dec 2021 15:12:31 +0100 Subject: [PATCH] first try upgrading to 1.1.15 release disabling auto-upgrade need to change the config.local.php file --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- scripts/install | 1 + scripts/upgrade | 15 ++++++++++++++- 6 files changed, 20 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cb63e86..7304fd2 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Garradin (word meaning money in an aboriginal dialect of northern Australia, pronounced "gar-a-dine" em) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members, etc. etc. . -**Shipped version:** 1.1.14~ynh1 +**Shipped version:** 1.1.15~ynh1 **Demo:** https://garradin.eu/essai/ diff --git a/README_fr.md b/README_fr.md index bda5c5d..9a14680 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Garradin (mot signifiant argent dans un dialecte aborigène du nord de l'Australie, prononcé « gar-a-dine »em) est un logiciel de gestion associative. Il est l'outil de prédilection pour gérer une association, un club sportif, une ONG, etc. Il est conçu pour répondre aux besoins d'une structure de petite à moyenne taille : gestion des adhérents, comptabilité, site web, prise de notes en réunion, archivage et partage des documents de fonctionnement de l'association, discussion entre adhérents, etc etc. -**Version incluse :** 1.1.14~ynh1 +**Version incluse :** 1.1.15~ynh1 **Démo :** https://garradin.eu/essai/ diff --git a/conf/app.src b/conf/app.src index 06e9006..4e6d4f4 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.1.14.tar.bz2 -SOURCE_SUM=bd735252540c6d26a1593d61486881a296a9b4a166532083805808b015da33d7 +SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.1.15.tar.gz +SOURCE_SUM=451c87a356c942ecd2233684faf406d640fca7ca6a65856faf3f341c9941e2f3 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 4d599c2..4b85cb0 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Software to manage association", "fr": "Logiciel libre de gestion d'association" }, - "version": "1.1.14~ynh1", + "version": "1.1.15~ynh1", "url": "http://garradin.eu", "upstream": { "license": "GPL-3.0-or-later", diff --git a/scripts/install b/scripts/install index 056bbe3..b187fe1 100644 --- a/scripts/install +++ b/scripts/install @@ -94,6 +94,7 @@ if [ "$path_url" == "/" ]; then else ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" fi +ynh_replace_string --match_string="//const ENABLE_UPGRADES = true;" --replace_string="//const ENABLE_UPGRADES = false;" --target_file="$final_path/config.local.php" # Permissions on files and directories chmod -R o-rwx "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index e47b8cf..8906207 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -186,7 +186,7 @@ ynh_script_progression --message="Upgrading source files..." --weight=5 if [ "$upgrade_type" == "UPGRADE_APP" ] then # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --keep="config.local.php" --dest_dir="$final_path" + ynh_setup_source --dest_dir="$final_path" fi #================================================= @@ -230,6 +230,19 @@ fi #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=5 +# copy config.dist.php creating config.local.php +cp -a $final_path/config.dist.php $final_path/config.local.php +# create a key for the secret key CSFR; +key=$(ynh_string_random --length=50) +# edit config.local.php +ynh_replace_string --match_string="const SECRET_KEY = '3xUhIgGwuovRKOjVsVPQ5yUMfXUSIOX2GKzcebsz5OINrYC50r';" --replace_string="const SECRET_KEY = '$key';" --target_file="$final_path/config.local.php" +if [ "$path_url" == "/" ]; then + ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url';" --target_file="$final_path/config.local.php" +else + ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" +fi +ynh_replace_string --match_string="//const ENABLE_UPGRADES = true;" --replace_string="//const ENABLE_UPGRADES = false;" --target_file="$final_path/config.local.php" + # Permissions on files and directories chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path"