From 0e61609e6fe466b066b783b3eef59106abac3798 Mon Sep 17 00:00:00 2001 From: Emmanuel Averty Date: Sat, 13 Jan 2024 12:02:25 +0100 Subject: [PATCH] fix: check and create login auth source on each upgrade --- README.md | 2 +- README_fr.md | 2 +- manifest.toml | 2 +- scripts/upgrade | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 96ffdba..4e8e179 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Brought to you by an inclusive community under the umbrella of Codeberg e.V., a - Customize HTML templates, static files and many others. -**Shipped version:** 1.21.3-0~ynh1 +**Shipped version:** 1.21.3-0~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 3f82523..6339fd8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -34,7 +34,7 @@ Brought to you by an inclusive community under the umbrella of Codeberg e.V., a - Customize HTML templates, static files and many others. -**Version incluse :** 1.21.3-0~ynh1 +**Version incluse :** 1.21.3-0~ynh2 ## Captures d’écran diff --git a/manifest.toml b/manifest.toml index aab166c..fb5b163 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Forgejo" description.en = "Lightweight software forge" description.fr = "Forge logiciel légère" -version = "1.21.3-0~ynh1" +version = "1.21.3-0~ynh2" maintainers = ["Emmanuel Averty"] diff --git a/scripts/upgrade b/scripts/upgrade index bf9ed56..fc10656 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,10 +39,11 @@ pushd "$install_dir" # Delete old login source ynh_exec_as $app ./forgejo admin auth delete --id $old_login_source_id - - # Create new login source - set_forgejo_login_source fi + + ynh_exec_as $app ./forgejo admin auth list | grep "YunoHost LDAP" | grep -q "LDAP (simple auth)" || + # create new login source if not existing + set_forgejo_login_source popd # Update login source synchronization flag (1.19.3-0~ynh3)