1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/glitchsoc_ynh.git synced 2024-09-03 19:15:59 +02:00

Ruby update 2.5.3

This commit is contained in:
anmol 2018-11-02 18:48:49 +05:30
parent 8ab1845358
commit 1752d37cbd

View file

@ -127,25 +127,25 @@ ynh_setup_source "$final_path/.rbenv/plugins/ruby-build" "app-ruby-build"
# Install ruby 2.5.1
(
exec_as "$app" $final_path/.rbenv/bin/rbenv install -s 2.5.1 || true
exec_as "$app" $final_path/.rbenv/bin/rbenv global 2.5.1 || true
exec_as "$app" $final_path/.rbenv/versions/2.5.1/bin/ruby -v
exec_as "$app" $final_path/.rbenv/bin/rbenv install -s 2.5.3 || true
exec_as "$app" $final_path/.rbenv/bin/rbenv global 2.5.3 || true
exec_as "$app" $final_path/.rbenv/versions/2.5.3/bin/ruby -v
)
# Create symlink for ruby
rm /usr/bin/ruby || true
ln -s $final_path/.rbenv/versions/2.5.1/bin/ruby /usr/bin/ruby || true
ln -s $final_path/.rbenv/versions/2.5.3/bin/ruby /usr/bin/ruby || true
# Preconfig CSS & JS
# Install Mastodon
(
sudo su - $app <<MCOMMANDS
pushd ~/live
$final_path/.rbenv/versions/2.5.1/bin/gem install bundler
$final_path/.rbenv/versions/2.5.3/bin/gem install bundler
if [ "$(lsb_release --codename --short)" == "jessie" ]; then
$final_path/.rbenv/versions/2.5.1/bin/bundle install --deployment --without development test
$final_path/.rbenv/versions/2.5.3/bin/bundle install --deployment --without development test
else
$final_path/.rbenv/versions/2.5.1/bin/bundle install --deployment --force --without development test
$final_path/.rbenv/versions/2.5.3/bin/bundle install --deployment --force --without development test
fi
yarn install --pure-lockfile
MCOMMANDS
@ -160,13 +160,13 @@ popd
# Apply Mastodon upgrade
(
pushd $final_path/live
RAILS_ENV=production $final_path/.rbenv/versions/2.5.1/bin/bundle exec rails assets:clean
RAILS_ENV=production $final_path/.rbenv/versions/2.5.1/bin/bundle exec rails assets:precompile
RAILS_ENV=production $final_path/.rbenv/versions/2.5.3/bin/bundle exec rails assets:clean
RAILS_ENV=production $final_path/.rbenv/versions/2.5.3/bin/bundle exec rails assets:precompile
popd
sudo su - $app <<COMMANDS
pushd ~/live
RAILS_ENV=production $final_path/.rbenv/versions/2.5.1/bin/bundle exec rails db:migrate
RAILS_ENV=production $final_path/.rbenv/versions/2.5.3/bin/bundle exec rails db:migrate
COMMANDS
)
#=================================================