pleromer-stuff/update.sh

12 lines
849 B
Bash
Raw Permalink Normal View History

2023-10-19 16:16:13 +00:00
#!/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