From c497256a8e5afe84073850a81e9a920bf11dba93 Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Sun, 23 Jan 2022 21:06:29 +0000 Subject: [PATCH] Even better timing 8) --- scripts/install | 4 ++-- scripts/remove | 2 +- scripts/restore | 4 ++-- scripts/upgrade | 30 ++++++++++++------------------ 4 files changed, 17 insertions(+), 23 deletions(-) diff --git a/scripts/install b/scripts/install index de81199..ad72e5f 100644 --- a/scripts/install +++ b/scripts/install @@ -70,7 +70,7 @@ ynh_app_setting_set --app=$app --key=port_stream --value=$port_stream #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=600 +ynh_script_progression --message="Installing dependencies..." --weight=60 ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION @@ -198,7 +198,7 @@ ynh_add_systemd_config --service="$app-streaming" --template="glitchsoc-streamin #================================================= # INSTALLING GLITCH-SOC #================================================= -ynh_script_progression --message="Installing Glitch-Soc..." --weight=300 +ynh_script_progression --message="Installing Glitch-Soc..." --weight=30 pushd "$final_path/live" ynh_exec_as $app $ynh_ruby_load_path bin/bundle config deployment 'true' diff --git a/scripts/remove b/scripts/remove index cde912a..0d7da1f 100644 --- a/scripts/remove +++ b/scripts/remove @@ -83,7 +83,7 @@ ynh_remove_nginx_config #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies..." --weight=300 +ynh_script_progression --message="Removing dependencies..." --weight=30 # Remove metapackage and its dependencies ynh_remove_ruby diff --git a/scripts/restore b/scripts/restore index 115d28d..386825a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -75,7 +75,7 @@ chown -R $app:www-data "$final_path" #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=600 +ynh_script_progression --message="Reinstalling dependencies..." --weight=60 # Define and install dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies @@ -112,7 +112,7 @@ ynh_add_swap --size=$swap_needed #================================================= # INSTALLING RUBY AND BUNDLER #================================================= -ynh_script_progression --message="Installing Ruby dependencies..." --weight=300 +ynh_script_progression --message="Installing Ruby dependencies..." --weight=30 pushd "$final_path/live" ynh_use_ruby diff --git a/scripts/upgrade b/scripts/upgrade index b31403b..aad03b8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -204,15 +204,12 @@ ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES #================================================= -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading dependencies..." --weight=600 +ynh_script_progression --message="Upgrading dependencies..." --weight=60 - ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies - ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION - ynh_exec_warn_less ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" - ynh_exec_warn_less ynh_install_ruby --ruby_version=$RUBY_VERSION -fi +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION +ynh_exec_warn_less ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" +ynh_exec_warn_less ynh_install_ruby --ruby_version=$RUBY_VERSION #================================================= # SPECIFIC UPGRADE @@ -235,16 +232,13 @@ ynh_add_swap --size=$swap_needed #================================================= # INSTALLING RUBY AND BUNDLER #================================================= -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Installing Ruby dependencies..." --weight=6 +ynh_script_progression --message="Installing Ruby dependencies..." --weight=6 - pushd "$final_path/live" - ynh_use_ruby - ynh_gem update --system --no-document - ynh_gem install bundler --no-document - popd -fi +pushd "$final_path/live" + ynh_use_ruby + ynh_gem update --system --no-document + ynh_gem install bundler --no-document +popd #================================================= # UPDATE A CONFIG FILE @@ -273,7 +267,7 @@ ynh_add_systemd_config --service="$app-streaming" --template="glitchsoc-streamin #================================================= if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Upgrading Glitch-Soc..." --weight=300 + ynh_script_progression --message="Upgrading Glitch-Soc..." --weight=30 pushd "$final_path/live" ynh_exec_as $app $ynh_ruby_load_path bin/bundle config deployment 'true'