diff --git a/manifest.toml b/manifest.toml index d7f61c8..73245c2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Glitch-Soc" description.en = "Libre and federated social network, fork of Mastodon" description.fr = "Réseau social libre et fédéré, scission de Mastodon" -version = "2023.05.27~ynh2" +version = "2023.06.19~ynh2" maintainers = ["Tagada"] @@ -57,8 +57,8 @@ ram.runtime = "1G" [resources] [resources.sources.main] - url = "https://github.com/glitch-soc/mastodon/archive/0222df6047a8569d04cfdc36668d46b71bec2e75.tar.gz" - sha256 = "766f9dad04638f51eb66a8395cccc4effe6685a1d2ef8448f48ad8ac53694d38" + url = "https://github.com/glitch-soc/mastodon/archive/eba3411bfa40cbb36205f58a36e34c446fed0ffa.tar.gz" + sha256 = "7b49f8829f219a0310fefc9eac91f1f00383c6df09413fe085d411758774ce15" autoupdate.strategy = "latest_github_commit" diff --git a/scripts/install b/scripts/install index d91ebad..eb39bbf 100644 --- a/scripts/install +++ b/scripts/install @@ -60,7 +60,7 @@ config="$install_dir/live/.env.production" language="$(echo $language | head -c 2)" -redis_namespace=${app}_production +redis_namespace=${app} ynh_app_setting_set --app="$app" --key=redis_namespace --value="$redis_namespace" secret_key_base=$(ynh_string_random --length=128) @@ -122,9 +122,6 @@ yunohost service add "$app-streaming" --description="$app streaming service" ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" -mkdir -p "/var/log/$app" -ynh_use_logrotate - #================================================= # APP INITIAL CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index c0bb3ce..9dd50e4 100644 --- a/scripts/restore +++ b/scripts/restore @@ -77,10 +77,6 @@ yunohost service add "$app-sidekiq" --description="$app sidekiq service" yunohost service add "$app-streaming" --description="$app streaming service" # Other various files... - -mkdir -p "/var/log/$app" -ynh_use_logrotate - ynh_restore_file --origin_path="/etc/cron.d/$app" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 91fd79c..186f244 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -55,7 +55,7 @@ if [[ -z "$redis_namespace" ]]; then ynh_app_setting_set --app=$app --key=redis_namespace --value=$redis_namespace fi -# Rename the database to match packaging v2 defaults db_name +# Rename the database to match packaging v2 defaults db_name (`$app_production` to `$app`) if [[ $db_name = *'_production' ]]; then ynh_systemd_action --service_name=${app}-web --action="stop" --log_path=systemd --line_match="Stopped" ynh_systemd_action --service_name=${app}-sidekiq --action="stop" --log_path=systemd --line_match="Stopped" @@ -66,6 +66,11 @@ if [[ $db_name = *'_production' ]]; then ynh_app_setting_set --app=$app --key=db_name --value=$db_name fi +if ynh_compare_current_package_version --comparison lt --version 2023.06.19~ynh2 +then + ynh_remove_logrotate +fi + #================================================= # STOP SYSTEMD SERVICE #================================================= @@ -77,6 +82,13 @@ ynh_systemd_action --service_name=${app}-streaming --action="stop" --log_path=sy #================================================= # "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) +#================================================= +# Update Ruby and NodeJS +ynh_script_progression --message="Upgrading Ruby and NodeJS..." --weight=5 + +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION +ynh_exec_warn_less ynh_install_ruby --ruby_version=$RUBY_VERSION + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -104,12 +116,6 @@ then chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" - # Update Ruby and NodeJS - ynh_script_progression --message="Upgrading Ruby and NodeJS..." --weight=10 - - ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION - ynh_exec_warn_less ynh_install_ruby --ruby_version=$RUBY_VERSION - pushd "$install_dir/live" ynh_use_ruby ynh_gem update --system --no-document @@ -151,9 +157,6 @@ ynh_add_systemd_config ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" -mkdir -p "/var/log/$app" -ynh_use_logrotate - #================================================= # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) #================================================= diff --git a/tests.toml b/tests.toml index df2c8e0..1d77b27 100644 --- a/tests.toml +++ b/tests.toml @@ -21,4 +21,4 @@ test_format = 1.0 # Commits to test upgrade from # ------------------------------- - test_upgrade_from.d5def5c.name = "Upgrade from 2023.05.27~ynh2" + test_upgrade_from.9c7a5ae.name = "Upgrade from 2023.06.19~ynh1"