feat(scripts): ✨ Add automatic migration handling to update.py.
This commit is contained in:
+2
-11
@@ -1,19 +1,10 @@
|
||||
[project]
|
||||
name = "payphone"
|
||||
version = "0.42.0"
|
||||
version = "0.43.0"
|
||||
description = "Add your description here"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
dependencies = [
|
||||
"aerich>=0.8.2",
|
||||
"aiohttp>=3.10.10",
|
||||
"orjson>=3.10.11",
|
||||
"py-cord>=2.6.1",
|
||||
"redis[hiredis]>=5.2.0",
|
||||
"rich>=13.9.4",
|
||||
"tortoise-orm[accel,asyncpg]>=0.21.7",
|
||||
"typer>=0.13.0",
|
||||
]
|
||||
dependencies = [ "aerich>=0.8.2", "aiohttp>=3.10.10", "orjson>=3.10.11", "py-cord>=2.6.1", "redis[hiredis]>=5.2.0", "rich>=13.9.4", "tortoise-orm[accel,asyncpg]>=0.21.7", "typer>=0.13.0",]
|
||||
|
||||
[dependency-groups]
|
||||
dev = [ "python-dotenv>=1.0.1", "toml>=0.10.2",]
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
version = 1
|
||||
revision = 1
|
||||
requires-python = ">=3.12"
|
||||
|
||||
[[package]]
|
||||
@@ -127,7 +128,7 @@ version = "8.1.8"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "anyio" },
|
||||
{ name = "colorama", marker = "platform_system == 'Windows'" },
|
||||
{ name = "colorama", marker = "sys_platform == 'win32'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/cb/b5/e1e5fdf1c1bb7e6e614987c120a98d9324bf8edfaa5f5cd16a6235c9d91b/asyncclick-8.1.8.tar.gz", hash = "sha256:0f0eb0f280e04919d67cf71b9fcdfb4db2d9ff7203669c40284485c149578e4c", size = 232900 }
|
||||
wheels = [
|
||||
@@ -188,7 +189,7 @@ name = "click"
|
||||
version = "8.1.8"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "colorama", marker = "platform_system == 'Windows'" },
|
||||
{ name = "colorama", marker = "sys_platform == 'win32'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593 }
|
||||
wheels = [
|
||||
@@ -404,7 +405,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "payphone"
|
||||
version = "0.41.0"
|
||||
version = "0.42.0"
|
||||
source = { virtual = "." }
|
||||
dependencies = [
|
||||
{ name = "aerich" },
|
||||
|
||||
Reference in New Issue
Block a user