Skip to content

Instantly share code, notes, and snippets.

@momoseijin
Last active April 17, 2019 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save momoseijin/b0ef3750878633856d6e5ad0334d9bb7 to your computer and use it in GitHub Desktop.
Save momoseijin/b0ef3750878633856d6e5ad0334d9bb7 to your computer and use it in GitHub Desktop.
Update to Mastodon v2.8.0
#Mastodon を止める
systemctl stop mastodon-{web,sidekiq,streaming}.service
#Mastodon ユーザになる
sudo su - mastodon
#今回の Ruby 2.6.1 のアップデートをするためにrbenvのおいてあるディレクトリに移り最新版をダウンロード
cd ~/.rbenv
git pull
#同じようにプラグインのディレクトリに移り最新版をダウンロード
cd ~/.rbenv/plugins/ruby-build
git pull
#rbenv のディレクトリに戻り rbenv から Ruby を 2.6.1 へ
cd ~/.rbenv
rbenv install 2.6.1
rbenv global 2.6.1
rbenv rehash
#Mastodon のディレクトリに戻って v2.8.0 をもってくる
cd ~/live
git fetch
git tag
git checkout v2.8.0
#git branchでチェック
git branch
#こんな表示になる
$ git branch
* (detached from v2.8.0)
master
#今回の gem のアップデートをする
gem update --system
#リリースノートにあるいつものような処理をすすめる
bundle install --deployment --without development test
yarn install --pure-lockfile
RAILS_ENV=production bundle exec rails db:migrate
RAILS_ENV=production bundle exec rails assets:precompile
#root に戻って、Mastodon をリスタートして無事立ち上がれば終了
exit
systemctl restart mastodon-{web,sidekiq,streaming}.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment