diff options
| author | nemsia <nemsia@nemsia.org> | 2017-04-30 00:01:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-30 00:01:11 +0200 |
| commit | 5bcc59f37c0512c9c2adf6f3946770ade60f0f96 (patch) | |
| tree | d117d00fc78c5fce3a9ae7404804b04816330fc7 /scripts/upgrade | |
| parent | 3b3f95cfe38c83499a183518038c4db8119a3acf (diff) | |
| download | mastodon_ynh-5bcc59f37c0512c9c2adf6f3946770ade60f0f96.tar.gz mastodon_ynh-5bcc59f37c0512c9c2adf6f3946770ade60f0f96.tar.bz2 mastodon_ynh-5bcc59f37c0512c9c2adf6f3946770ade60f0f96.zip | |
[enh] Switch to tagged release on upgrade
Diffstat (limited to 'scripts/upgrade')
| -rw-r--r-- | scripts/upgrade | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/upgrade b/scripts/upgrade index 07b3ee7..d1f985e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -37,12 +37,20 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf # Stop Mastodon Services sudo systemctl stop mastodon-*.service -# Update Mastodon -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 +pushd ~/live bin/bundle install yarn install --pure-lockfile RAILS_ENV=production bundle exec rails assets:clean |
