1
mirror of https://github.com/jakejarvis/mastodon-installer.git synced 2025-04-25 18:45:23 -04:00

support glitch-soc in upgrade script

This commit is contained in:
Jake Jarvis 2022-12-11 09:56:45 -05:00
parent 85c1d27fd5
commit aa46cabb7c
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39

View File

@ -20,8 +20,16 @@ sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y
# pull latest mastodon source
cd "$MASTODON_ROOT/live"
sudo -u mastodon git fetch --tags
sudo -u mastodon git checkout "$(sudo -u mastodon git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)"
sudo -u mastodon git fetch --all
sudo -u mastodon git stash push --message "pre-upgrade changes" || true
if [ -d "$MASTODON_ROOT/live/app/javascript/flavours/glitch" ]; then
# glitch-soc (uses latest commits)
echo "glitch-soc detected, applying latest commits from there instead..."
sudo -u mastodon git checkout glitch-soc/main
else
# vanilla Mastodon (uses latest release)
sudo -u mastodon git checkout "$(sudo -u mastodon git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)"
fi
# set new ruby version
RUBY_VERSION="$(sudo -u mastodon cat $MASTODON_ROOT/live/.ruby-version)"