diff options
| author | nemsia <nemsia@nemsia.org> | 2017-04-30 14:24:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-30 14:24:02 +0200 |
| commit | 1b76f0b4daeea40dbae1e5cccdb88d63b0914e97 (patch) | |
| tree | ab81eb7f704ffc3e686c99ea74f4ef005606bcce /scripts/upgrade | |
| parent | e7ed942684dd6b2cb0be509878048a85d8642f8d (diff) | |
| download | mastodon_ynh-1b76f0b4daeea40dbae1e5cccdb88d63b0914e97.tar.gz mastodon_ynh-1b76f0b4daeea40dbae1e5cccdb88d63b0914e97.tar.bz2 mastodon_ynh-1b76f0b4daeea40dbae1e5cccdb88d63b0914e97.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..ab4bf58 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 +cd $final_path/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 |
