Browse Source

add update script

master
Dryusdan 1 year ago
parent
commit
eda79c7e86
1 changed files with 24 additions and 0 deletions
  1. 24
    0
      updateMastodon.sh

+ 24
- 0
updateMastodon.sh View File

@@ -0,0 +1,24 @@
#!/bin/sh

echo "**** stop mastodon ****"
systemctl stop mastodon-web mastodon-sidekiq mastodon-streaming
cd /home/mastodon/live
sudo -u mastodon git fetch --tags -v

read -p "Which version do you want to use? " MASTODON_VERSION

sudo -u mastodon git checkout $MASTODON_VERSION
gem install bundler
sudo -u mastodon bundle install
npm upgrade yarn
sudo -u mastodon yarn install
touch app/javascript/styles/application.scss
git apply --whitespace=nowarn /home/mastodon/mastodon-patch/*
sudo -u mastodon RAILS_ENV=production bundle exec rails assets:clean
sudo -u mastodon RAILS_ENV=production bundle exec rails assets:precompile
sudo -u mastodon RAILS_ENV=production bundle exec rails db:migrate

echo "**** start mastdon ****"
systemctl start mastodon-web mastodon-sidekiq mastodon-streaming

echo "**** End of update ****"

Loading…
Cancel
Save