From 69be8d685afe002d680653aef23a8ba0226961cb Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 7 Apr 2020 17:06:28 +0200 Subject: [PATCH] Bump ruby to 2.6.6 --- check_process | 2 ++ conf/cron | 2 +- conf/mastodon-sidekiq.service | 2 +- conf/mastodon-web.service | 2 +- scripts/install | 14 +++++++------- scripts/restore | 6 +++--- scripts/upgrade | 14 +++++++------- 7 files changed, 22 insertions(+), 20 deletions(-) diff --git a/check_process b/check_process index 66a0890..4ee50cb 100644 --- a/check_process +++ b/check_process @@ -12,6 +12,8 @@ setup_private=0 setup_public=1 upgrade=1 + # 3.1.2 + upgrade=1 from_commit=7e1f4c2dee5f2c8374686aea62f4648cdf2722c3 backup_restore=1 multi_instance=1 # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. diff --git a/conf/cron b/conf/cron index 9a984a3..a435084 100644 --- a/conf/cron +++ b/conf/cron @@ -1,2 +1,2 @@ RAILS_ENV=production -@daily cd __FINAL__PATH__/live && /opt/rbenv/versions/2.6.5/bin/bundle exec rake __USER__:media:remove_remote +@daily cd __FINAL__PATH__/live && /opt/rbenv/versions/2.6.6/bin/bundle exec rake __USER__:media:remove_remote diff --git a/conf/mastodon-sidekiq.service b/conf/mastodon-sidekiq.service index d5fc7e1..1085e1f 100644 --- a/conf/mastodon-sidekiq.service +++ b/conf/mastodon-sidekiq.service @@ -9,7 +9,7 @@ Environment="RAILS_ENV=production" Environment="DB_POOL=25" Environment="MALLOC_ARENA_MAX=2" - ExecStart=/opt/rbenv/versions/2.6.5/bin/bundle exec sidekiq -c 25 + ExecStart=/opt/rbenv/versions/2.6.6/bin/bundle exec sidekiq -c 25 TimeoutSec=15 Restart=always StandardError=syslog diff --git a/conf/mastodon-web.service b/conf/mastodon-web.service index bb65afe..234320f 100644 --- a/conf/mastodon-web.service +++ b/conf/mastodon-web.service @@ -8,7 +8,7 @@ WorkingDirectory=__FINALPATH__/live Environment="RAILS_ENV=production" Environment="PORT=__PORT_WEB__" - ExecStart=/opt/rbenv/versions/2.6.5/bin/bundle exec puma -C config/puma.rb + ExecStart=/opt/rbenv/versions/2.6.6/bin/bundle exec puma -C config/puma.rb ExecReload=/bin/kill -SIGUSR1 $MAINPID TimeoutSec=15 Restart=always diff --git a/scripts/install b/scripts/install index 989954b..5fca585 100644 --- a/scripts/install +++ b/scripts/install @@ -150,9 +150,9 @@ ynh_add_swap --size=$swap_needed #================================================= ynh_script_progression --message="Installing Ruby..." --weight=424 -ynh_install_ruby --ruby_version=2.6.5 -/opt/rbenv/versions/2.6.5/bin/gem update --system -/opt/rbenv/versions/2.6.5/bin/gem install bundler:1.17.3 --no-document +ynh_install_ruby --ruby_version=2.6.6 +/opt/rbenv/versions/2.6.6/bin/gem update --system +/opt/rbenv/versions/2.6.6/bin/gem install bundler:1.17.3 --no-document #================================================= # MODIFY A CONFIG FILE @@ -190,12 +190,12 @@ chown -R "$app": "$final_path" pushd "$final_path/live" ynh_use_nodejs - sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/2.6.5/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test + sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/2.6.6/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test sudo -u "$app" env PATH=$PATH yarn install --pure-lockfile sudo -u "$app" echo "SAFETY_ASSURED=1">> .env.production - sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.5/bin/bundle exec rails db:setup --quiet - sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.5/bin/bundle exec rails assets:precompile --quiet - sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.5/bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt + sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.6/bin/bundle exec rails db:setup --quiet + sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.6/bin/bundle exec rails assets:precompile --quiet + sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.6/bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt sudo -u "$app" env PATH=$PATH RAILS_ENV=production bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=admin > acc.txt popd diff --git a/scripts/restore b/scripts/restore index c6e4bc8..81c242e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -114,9 +114,9 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st #================================================= ynh_script_progression --message="Installing Ruby..." --weight=393 -ynh_install_ruby --ruby_version=2.6.5 -/opt/rbenv/versions/2.6.5/bin/gem update --system -/opt/rbenv/versions/2.6.5/bin/gem install bundler:1.17.3 --no-document +ynh_install_ruby --ruby_version=2.6.6 +/opt/rbenv/versions/2.6.6/bin/gem update --system +/opt/rbenv/versions/2.6.6/bin/gem install bundler:1.17.3 --no-document #================================================= # RESTORE THE POSTGRESQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index ce71ee1..e24b610 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -244,9 +244,9 @@ ynh_add_swap --size=$swap_needed #================================================= ynh_script_progression --message="Installing Ruby..." --weight=424 -ynh_install_ruby --ruby_version=2.6.5 -/opt/rbenv/versions/2.6.5/bin/gem update --system -/opt/rbenv/versions/2.6.5/bin/gem install bundler:1.17.3 --no-document +ynh_install_ruby --ruby_version=2.6.6 +/opt/rbenv/versions/2.6.6/bin/gem update --system +/opt/rbenv/versions/2.6.6/bin/gem install bundler:1.17.3 --no-document #================================================= # MODIFY A CONFIG FILE @@ -282,11 +282,11 @@ chown -R "$app": "$final_path" pushd "$final_path/live" ynh_use_nodejs - sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/2.6.5/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test + sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/2.6.6/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test sudo -u "$app" env PATH=$PATH yarn install --pure-lockfile - sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.5/bin/bundle exec rails assets:clean - sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.5/bin/bundle exec rails assets:precompile - sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.5/bin/bundle exec rails db:migrate + sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.6/bin/bundle exec rails assets:clean + sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.6/bin/bundle exec rails assets:precompile + sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.6/bin/bundle exec rails db:migrate sudo -u "$app" env PATH=$PATH RAILS_ENV=production bin/tootctl cache clear popd