add update script

This commit is contained in:
skylar 2023-10-19 11:16:13 -05:00
parent af954eda2a
commit 558229e55c

11
update.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
cd /opt/pleroma
sudo -Hu pleroma git pull
sudo -Hu pleroma MIX_ENV=prod mix deps.get
FRONTEND_LINK=`curl -sS https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/develop/download?job=build | grep -io '<a href=['"'"'"][^"'"'"']*['"'"'"]' | sed -e 's/^<a href=["'"'"']//i' -e 's/["'"'"']$//i'```
sudo -Hu pleroma MIX_ENV=prod mix pleroma.frontend install pleroma-fe --ref develop --build-url ${FRONTEND_LINK}
ADMINFE_LINK=`curl -sS https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/develop/download?job=build | grep -io '<a href=['"'"'"][^"'"'"']*['"'"'"]' | sed -e 's/^<a href=["'"'"']//i' -e 's/["'"'"']$//i'```
sudo -Hu pleroma MIX_ENV=prod mix pleroma.frontend install admin-fe --ref develop --build-url ${ADMINFE_LINK}
systemctl stop pleroma
sudo -Hu pleroma MIX_ENV=prod mix ecto.migrate
systemctl start pleroma