aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornemsia <nemsia@nemsia.org>2017-10-11 18:59:24 +0200
committerGitHub <noreply@github.com>2017-10-11 18:59:24 +0200
commit502e75555bd83719746ca5c09fc18ce836cd4cb8 (patch)
treed06019002a47076f2e74a411d0889091dcf410d9
parent099de1658ff1e78c7c4f75c85b1dc496627ee3d0 (diff)
downloadmastodon_ynh-502e75555bd83719746ca5c09fc18ce836cd4cb8.tar.gz
mastodon_ynh-502e75555bd83719746ca5c09fc18ce836cd4cb8.tar.bz2
mastodon_ynh-502e75555bd83719746ca5c09fc18ce836cd4cb8.zip
Upgrade to ruby 2.5.2 for release 2.0
-rw-r--r--scripts/upgrade17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/upgrade b/scripts/upgrade
index 11f9966..0c818cd 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -66,6 +66,23 @@ fi
# add additional package for release 1.4
ynh_package_install pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev
+# Install ruby 2.5.2 for release 2.0
+sudo su - $app <<RCOMMANDS
+/opt/mastodon/.rbenv/bin/rbenv install 2.5.2
+/opt/mastodon/.rbenv/versions/2.5.2/bin/ruby -v
+RCOMMANDS
+
+# Create symlink for ruby 2.5.2
+sudo ln -s /opt/mastodon/.rbenv/versions/2.5.2/bin/ruby /usr/bin/ruby || true
+
+# Install Mastodon
+sudo su - $app <<MCOMMANDS
+pushd ~/live
+/opt/mastodon/.rbenv/versions/2.5.2/bin/gem install bundler
+bin/bundle install --deployment --without development test
+yarn install --production
+MCOMMANDS
+
# Apply Mastodon upgrade
sudo su - $app <<COMMANDS
pushd ~/live