1
mirror of https://github.com/jakejarvis/mastodon-utils.git synced 2025-06-27 17:25:42 -04:00

apply patches during upgrade script

This commit is contained in:
2022-12-07 12:31:15 -05:00
parent b39506d270
commit 86aa0a566f
10 changed files with 47 additions and 9160 deletions

21
scripts/apply_patches.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# exit when any step fails
set -euo pipefail
# default paths
MASTODON_ROOT=/home/mastodon
if [ ! -d "$MASTODON_ROOT/scripts" ]
then
sudo -u mastodon git clone https://github.com/jakejarvis/mastodon-scripts.git ./scripts
fi
# pull latest patches
cd "$MASTODON_ROOT/scripts"
sudo -u mastodon git fetch --all
sudo -u mastodon git pull origin main
# apply custom patches
cd "$MASTODON_ROOT/live"
sudo -u mastodon git apply --allow-binary-replacement --whitespace=warn "$MASTODON_ROOT"/mastodon-scripts/patches/*.patch || true

0
scripts/tootctl_shim.sh Normal file → Executable file
View File

3
scripts/upgrade_glitch.sh Normal file → Executable file
View File

@ -20,6 +20,9 @@ sudo -u mastodon git fetch --all
sudo -u mastodon git checkout glitch-soc/main
sudo -u mastodon git pull glitch-soc main
# pull & apply latest patches
. $(dirname "$0")/apply_patches.sh
# update dependencies
echo "Updating deps..."
sudo -u mastodon "$RBENV_ROOT/shims/bundle" install --jobs "$(getconf _NPROCESSORS_ONLN)"

0
scripts/version.sh Normal file → Executable file
View File

0
scripts/weekly_cleanup.sh Normal file → Executable file
View File