feat(scripts): ✨ Add automatic migration handling to update.py.

This commit is contained in:
2025-03-15 23:30:58 -03:00
parent 0e2a0553e6
commit 9445a9de29
3 changed files with 17 additions and 14 deletions
+11
View File
@@ -1,4 +1,5 @@
import os
import time
import getpass
username = input("Username for git.nyeki.dev: ")
@@ -24,4 +25,14 @@ microk8s kubectl set image pod/tasks \
"""
)
print("Waiting 15 seconds to run migrations...")
time.sleep(15)
shards = input("How many shards are there deployed?: ")
os.system(f"microk8s kubectl exec bot-{int(shards) - 1} -- uv run aerich upgrade")
print("Done!")
# expire=registry.nyeki.dev/payphone/payphone/shard:v{latest_version}