From a0d75d080747f4e475cab62d4db11e46490377a0 Mon Sep 17 00:00:00 2001 From: alemi Date: Sun, 24 Mar 2024 05:03:22 +0100 Subject: [PATCH] ci: rebuild db again im changing a lot of stuff its easier this way for now --- .tci | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.tci b/.tci index 87944b33..141c3ff4 100755 --- a/.tci +++ b/.tci @@ -5,9 +5,14 @@ cargo build --release --all-features echo "stopping service" systemctl --user stop upub echo "installing new binary" -cat ./target/release/upub > /opt/bin/upub -echo "migrating database" -/opt/bin/upub --db sqlite:///srv/tci/upub.db --domain https://feditest.alemi.dev migrate +cp ./target/release/upub /opt/bin/upub +echo "rebuilding database" +DB="/srv/tci/upub.db" +cp "$DB" "$DB.bak" +rm "$DB" +touch "$DB" +/opt/bin/upub --db "sqlite://$DB" --domain https://feditest.alemi.dev migrate +/opt/bin/upub --db "sqlite://$DB" --domain https://feditest.alemi.dev faker echo "restarting service" systemctl --user start upub echo "done"