diff --git a/README.md b/README.md index 7c24dc2..428ae9c 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Ampache is a web based audio/video streaming application and file manager allowi * Integrate with YunoHost users - same username and password * Allow one user to be the administrator (set at the installation) -**Shipped version:** 5.6.1~ynh1 +**Shipped version:** 6.0.1~ynh1 **Demo:** https://ampache.org/demo.html diff --git a/README_fr.md b/README_fr.md index 57defe9..f789f6d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Ampache is a web based audio/video streaming application and file manager allowi * Integrate with YunoHost users - same username and password * Allow one user to be the administrator (set at the installation) -**Version incluse :** 5.6.1~ynh1 +**Version incluse :** 6.0.1~ynh1 **Démo :** https://ampache.org/demo.html diff --git a/manifest.toml b/manifest.toml index 3a266f9..84fd4e1 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Ampache" description.en = "Web based audio/video streaming application" description.fr = "Application de streaming audio et vidéo" -version = "5.6.1~ynh1" +version = "6.0.1~ynh1" maintainers = [] @@ -17,7 +17,7 @@ admindoc = "https://github.com/ampache/ampache/wiki" code = "https://github.com/ampache/ampache" [integration] -yunohost = ">= 11.1.20" +yunohost = ">= 11.2" architectures = "all" multi_instance = true ldap = true @@ -43,8 +43,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/ampache/ampache/releases/download/5.6.1/ampache-5.6.1_all_php8.2.zip" - sha256 = "6b1b278aabfce74bab10384bce67535ee745438798c5fce736607534c93317d9" + url = "https://github.com/ampache/ampache/releases/download/6.0.1/ampache-6.0.1_all_php8.2.zip" + sha256 = "37cf6fa2f3540e7d1ed51db5f0517f0689119c148f7abfcc6eb62864e87f1119" in_subdir = false autoupdate.strategy = "latest_github_tag" diff --git a/scripts/_common.sh b/scripts/_common.sh index 9241d2f..1db13c2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # Composer version -YNH_COMPOSER_VERSION="2.5.7" +YNH_COMPOSER_VERSION="2.5.8" #================================================= # PERSONAL HELPERS diff --git a/scripts/restore b/scripts/restore index 27f21d5..b9e34be 100644 --- a/scripts/restore +++ b/scripts/restore @@ -20,6 +20,13 @@ ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" +#================================================= +# RESTORE THE MYSQL DATABASE +#================================================= +ynh_script_progression --message="Restoring the MySQL database..." --weight=2 + +ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql + #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= @@ -35,13 +42,6 @@ mkdir -p "/var/log/$app" chown $app: "/var/log/$app" ynh_restore_file --origin_path="/etc/logrotate.d/$app" -#================================================= -# RESTORE THE MYSQL DATABASE -#================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=2 - -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ae054bc..2dcfdd8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -72,12 +72,14 @@ fi #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a configuration file..." --weight=1 +#ynh_script_progression --message="Updating a configuration file..." --weight=1 -ynh_add_config --template="../conf/ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php" +#(cd $install_dir && ynh_exec_as "$app" php$phpversion bin/cli admin:updateDatabase -e) -chmod 600 "$install_dir/config/ampache.cfg.php" -chown $app: "$install_dir/config/ampache.cfg.php" +#ynh_add_config --template="../conf/ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php" + +#chmod 600 "$install_dir/config/ampache.cfg.php" +#chown $app: "$install_dir/config/ampache.cfg.php" #================================================= # UPDATE MULTIMEDIA DIRECTORIES @@ -94,6 +96,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_local_curl /update.php?action=update sleep 1 + (cd $install_dir && ynh_exec_as "$app" php$phpversion bin/cli admin:updateDatabase -e) fi #================================================= diff --git a/tests.toml b/tests.toml index f90bd8f..2454163 100644 --- a/tests.toml +++ b/tests.toml @@ -6,6 +6,6 @@ test_format = 1.0 # Commits to test upgrade from # ------------------------------- - test_upgrade_from.671b7d2129051dc1bef663c38bd55389cce95dc0.name = "Upgrade from 5.6.0" + test_upgrade_from.4680975ce19dbf1fd4af2218d56cd12f43d0ae85.name = "Upgrade from 5.6.1"