aboutsummaryrefslogtreecommitdiff
path: root/scripts/upgrade
diff options
context:
space:
mode:
authornemsia <nemsia@nemsia.org>2017-04-29 23:48:37 +0200
committerGitHub <noreply@github.com>2017-04-29 23:48:37 +0200
commitb9fc55ae810c9be5756c94b64f85759652ba8eaf (patch)
treeca630255139c8da887725acd5e1f8ecc050a5a22 /scripts/upgrade
parentb7789afb50f607cc84794c1315fc5eb23c85827c (diff)
downloadmastodon_ynh-b9fc55ae810c9be5756c94b64f85759652ba8eaf.tar.gz
mastodon_ynh-b9fc55ae810c9be5756c94b64f85759652ba8eaf.tar.bz2
mastodon_ynh-b9fc55ae810c9be5756c94b64f85759652ba8eaf.zip
[fix] Switch branch to tagged release
Diffstat (limited to 'scripts/upgrade')
-rw-r--r--scripts/upgrade14
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/upgrade b/scripts/upgrade
index f909d05..117a95f 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -37,13 +37,19 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
# Stop Mastodon Services
sudo systemctl stop mastodon-*.service
-# Update Mastodon
-pushd /opt/mastodon/live
-sudo su - $app <<COMMANDS
+# Download Mastodon
+sudo su - $app <<PULLCOMMANDS
pushd ~/live
git fetch
git pull https://github.com/tootsuite/mastodon.git master
-git checkout $(git tag | tail -n 1)
+PULLCOMMANDS
+
+# Switch branch to tagged release
+pushd /opt/mastodon/live
+sudo git checkout $(git tag | tail -n 1)
+
+# Apply Mastodon upgrade
+sudo su - $app <<COMMANDS
bin/bundle install
yarn install --pure-lockfile
RAILS_ENV=production bundle exec rails assets:clean