feat(shard): Lots of code.

This commit is contained in:
Nyeki.py
2024-11-15 23:24:11 -03:00
parent d9d752c730
commit 6377cb66c2
35 changed files with 2546 additions and 105 deletions
+33
View File
@@ -0,0 +1,33 @@
import os
import sys
try:
import toml
except ImportError:
print(
"You need to install `toml` to use this file. Run `pip install toml` and try again."
)
sys.exit()
data = toml.load(open("pyproject.toml"))
version = data["project"]["version"].split(".")
version[1] = str(int(version[1]) + 1)
data["project"]["version"] = ".".join(version)
version_num = version[1]
targets = ["tasks", "shard"]
for t in targets:
tag = f"git.nyeki.dev/payphone/payphone-{t}:v{version_num}"
os.system(f"docker build --target {t} --tag {tag} .")
os.system(f"docker push {tag}")
tag = f"git.nyeki.dev/payphone/payphone-{t}:latest"
os.system(f"docker build --target {t} --tag {tag} .")
os.system(f"docker push {tag}")
toml.dump(data, open("pyproject.toml", "w"))