From 8cf1a56a664ba37876d1bacc6516cfc923d56a5c Mon Sep 17 00:00:00 2001 From: Mateusz <2871798+orhtej2@users.noreply.github.com> Date: Wed, 3 Apr 2024 21:51:17 +0200 Subject: [PATCH] Update upgrade --- scripts/upgrade | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e16e80c..895cd0b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -98,19 +98,19 @@ pushd "$install_dir/live" ynh_use_ruby ynh_gem update --system ynh_gem install bundler --no-document - ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle config deployment 'true' - ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle config without 'development test' - ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle config set force_ruby_platform true --quiet - ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle install -j$(getconf _NPROCESSORS_ONLN) + ynh_exec_as "$app" env $ynh_ruby_load_path $ld_preload bin/bundle config deployment 'true' + ynh_exec_as "$app" env $ynh_ruby_load_path $ld_preload bin/bundle config without 'development test' + ynh_exec_as "$app" env $ynh_ruby_load_path $ld_preload bin/bundle config set force_ruby_platform true --quiet + ynh_exec_as "$app" env $ynh_ruby_load_path $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN) ynh_use_nodejs - corepack enable - yarn install + env $ynh_node_load_PATH corepack enable + ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack enable + ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate + ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=5000" yarn install if [ -d "$install_dir/live/public/assets" ]; then - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails assets:clean + ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails assets:clean fi - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails assets:precompile - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:migrate - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/tootctl cache clear + ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production $ynh_ruby_load_path NODE_OPTIONS="--max-old-space-size=5000" $ld_preload bin/bundle exec rails assets:precompile popd #================================================= @@ -120,8 +120,8 @@ ynh_script_progression --message="Applying migrations..." --weight=1 pushd "$install_dir/live" ynh_use_ruby - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:migrate - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/tootctl cache clear + ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails db:migrate + ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/tootctl cache clear popd #=================================================