feat(shard): ✨ Ignore checks for hardcoded IDs.

This commit is contained in:
Nyeki.py
2025-02-14 17:13:13 -03:00
parent dae522b061
commit fbc64e0d19
6 changed files with 17 additions and 32 deletions
+4 -28
View File
@@ -1,35 +1,10 @@
import os
import sys
import getpass
try:
import requests
except ImportError:
print(
"You need to install `requests` to use this file. Run `pip install requests` and try "
"again."
)
sys.exit()
username = input("Username for git.nyeki.dev: ")
password = getpass.getpass("Password for git.nyeki.dev: ")
tags = requests.get(
"https://registry.nyeki.dev/v2/payphone/payphone/shard/tags/list",
auth=(username, password),
).json()["tags"]
latest_version = 1
for tag in tags:
tag: str
if tag[1:].isdecimal():
version = int(tag[1:])
if version > latest_version:
latest_version = version
latest_version = input("Latest version: ")
print(f"Updating to tag v{latest_version}...")
@@ -40,7 +15,8 @@ os.system(
os.system(
f"""
microk8s kubectl set image pod/tasks \
connect=registry.nyeki.dev/payphone/payphone/shard:v{latest_version} \
expire=registry.nyeki.dev/payphone/payphone/shard:v{latest_version} \
connect=registry.nyeki.dev/payphone/payphone/shard:v{latest_version}
"""
)
# expire=registry.nyeki.dev/payphone/payphone/shard:v{latest_version}