upub/.tci

18 lines
530 B
Text
Raw Permalink Normal View History

2024-03-20 07:55:49 +01:00
#!/bin/bash
2025-01-22 01:21:00 +01:00
echo "building frontend bundle"
cd web
UPUB_BASE_URL="https://dev.upub.social" CARGO_BUILD_JOBS=4 /opt/bin/trunk build --release --public-url 'https://dev.upub.social/web/assets/'
2025-01-22 01:21:00 +01:00
cd ..
2024-03-20 07:55:49 +01:00
echo "building release binary"
2025-01-22 01:21:00 +01:00
cargo build --release --features=web -j 4
2024-03-20 07:55:49 +01:00
echo "stopping service"
systemctl --user stop upub
echo "installing new binary"
cp ./target/release/upub /opt/bin/upub
2024-03-26 00:51:28 +01:00
echo "migrating database"
2024-06-21 02:21:27 +02:00
/opt/bin/upub -c /etc/upub/config.toml migrate
2024-03-20 07:55:49 +01:00
echo "restarting service"
systemctl --user start upub
echo "done"