diff options
| author | nemsia <nemsia@nemsia.org> | 2017-04-29 23:48:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-29 23:48:37 +0200 |
| commit | b9fc55ae810c9be5756c94b64f85759652ba8eaf (patch) | |
| tree | ca630255139c8da887725acd5e1f8ecc050a5a22 | |
| parent | b7789afb50f607cc84794c1315fc5eb23c85827c (diff) | |
| download | mastodon_ynh-b9fc55ae810c9be5756c94b64f85759652ba8eaf.tar.gz mastodon_ynh-b9fc55ae810c9be5756c94b64f85759652ba8eaf.tar.bz2 mastodon_ynh-b9fc55ae810c9be5756c94b64f85759652ba8eaf.zip | |
[fix] Switch branch to tagged release
| -rw-r--r-- | scripts/upgrade | 14 |
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 |
