mirror of
https://github.com/YunoHost-Apps/glitchsoc_ynh.git
synced 2024-09-03 19:15:59 +02:00
[enh] Switch to tagged release on upgrade
This commit is contained in:
parent
3b3f95cfe3
commit
5bcc59f37c
1 changed files with 11 additions and 3 deletions
|
@ -37,12 +37,20 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
# Stop Mastodon Services
|
# Stop Mastodon Services
|
||||||
sudo systemctl stop mastodon-*.service
|
sudo systemctl stop mastodon-*.service
|
||||||
|
|
||||||
# Update Mastodon
|
# Download Mastodon
|
||||||
sudo su - $app <<COMMANDS
|
sudo su - $app <<PULLCOMMANDS
|
||||||
pushd ~/live
|
pushd ~/live
|
||||||
git fetch
|
git fetch
|
||||||
git pull https://github.com/tootsuite/mastodon.git master
|
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
|
bin/bundle install
|
||||||
yarn install --pure-lockfile
|
yarn install --pure-lockfile
|
||||||
RAILS_ENV=production bundle exec rails assets:clean
|
RAILS_ENV=production bundle exec rails assets:clean
|
||||||
|
|
Loading…
Reference in a new issue