Release v0.1.1 2026-07-10

This commit is contained in:
Warren H
2026-07-10 23:47:37 -04:00
parent 537a311f52
commit 6726c600e4
40 changed files with 2987 additions and 192 deletions
+38 -11
View File
@@ -28,7 +28,10 @@ GITEA_TOKEN = "ed2db3fd54546e9658377d0551b3fc3961583f1d"
GITEA_OWNER = "phenom"
GITEA_REPO = "i-want-to-heal-mmo"
BRANCH = "main"
TRUENAS_PATH = Path("/mnt/usbssds/apps/iwanttoheal/app")
TRUENAS_PATH = Path("/mnt/usbssds/apps/iwanttoheal-mmo/app")
TRUENAS_GITEA_REPO = Path(
"/mnt/.ix-apps/app_mounts/gitea/data/git/repositories/phenom/i-want-to-heal-mmo.git"
)
SEMVER = re.compile(r"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$")
@@ -256,8 +259,7 @@ def ensure_tag(version: str, commit: str, message: str) -> str:
def gitea_token() -> str:
token = "ed2db3fd54546e9658377d0551b3fc3961583f1d"
token = os.environ.get("GITEA_TOKEN", GITEA_TOKEN).strip()
if not token:
raise SystemExit(
"GITEA_TOKEN is required to create the release and upload the APK. "
@@ -402,21 +404,46 @@ def upload_apk(release: dict[str, object], apk: Path, token: str) -> None:
def update_truenas() -> None:
if (TRUENAS_PATH / ".git").is_dir():
origin = capture(["git", "remote", "get-url", "origin"], cwd=TRUENAS_PATH)
if normalized_remote(origin) != normalized_remote(GITEA_REMOTE):
accepted_origins = {
normalized_remote(GITEA_REMOTE),
normalized_remote(str(TRUENAS_GITEA_REPO)),
}
if normalized_remote(origin) not in accepted_origins:
raise SystemExit(
"Refusing to update TrueNAS from its old repository origin "
f"{origin!r}. Replace that checkout with {GITEA_REMOTE!r} first."
f"{origin!r}. Replace that checkout with this game's repository first."
)
run(["git", "pull", "--ff-only", "origin", BRANCH], cwd=TRUENAS_PATH)
print("TrueNAS source updated. Restart the iwanttoheal app in the TrueNAS UI.")
if TRUENAS_GITEA_REPO.is_dir():
run(
[
"git",
"-c",
f"safe.directory={TRUENAS_GITEA_REPO}",
"pull",
"--ff-only",
str(TRUENAS_GITEA_REPO),
BRANCH,
],
cwd=TRUENAS_PATH,
)
print(f"TrueNAS source updated from local Gitea storage: {TRUENAS_GITEA_REPO}")
else:
run(["git", "pull", "--ff-only", "origin", BRANCH], cwd=TRUENAS_PATH)
print("TrueNAS source updated from its configured origin.")
print("Restart the iwanttoheal-mmo app in the TrueNAS UI.")
return
print("New TrueNAS app clone is not mounted on this machine.")
print(f"Move or remove the old app directory at {TRUENAS_PATH}, then run:")
print(f" git clone {GITEA_REMOTE} {TRUENAS_PATH}")
print("Run these commands in the TrueNAS shell:")
print(f" sudo git config --global --add safe.directory {TRUENAS_GITEA_REPO}")
print(f" sudo git clone {TRUENAS_GITEA_REPO} {TRUENAS_PATH}")
print(f" sudo chown -R truenas_admin:truenas_admin {TRUENAS_PATH.parent}")
print("For later releases:")
print(f" git -C {TRUENAS_PATH} pull --ff-only origin {BRANCH}")
print("Then restart the iwanttoheal app in the TrueNAS UI.")
print(
f" git -C {TRUENAS_PATH} pull --ff-only "
f"{TRUENAS_GITEA_REPO} {BRANCH}"
)
print("Then restart the iwanttoheal-mmo app in the TrueNAS UI.")
def main(argv: list[str] | None = None) -> int: