From 821f983f57977eafddf212839adc70ea1d9f4bec Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 18 May 2026 04:49:05 +0900 Subject: [PATCH] feat: package tarball in script --- scripts/release.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/release.py b/scripts/release.py index 5fff112..c2e97ef 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -1,6 +1,7 @@ import build import os import subprocess +import tarfile from importlib import metadata from pathlib import Path @@ -35,6 +36,10 @@ env["PYAPP_PYTHON_VERSION"] = "3.13" proc = subprocess.run(["cargo", "build", "--release"], env=env, cwd=pyapp_dir) if proc.returncode == 0: output_exe = root.joinpath("pyapp-latest/target/release/pyapp") - release_exe = output.joinpath("dzgui") + release_exe = output.joinpath(APP_NAME_LOWER) output_exe.rename(release_exe) - print(f"Wrote output to '{release_exe}'") + tarname = APP_NAME_LOWER + ".tar.gz" + tarpath = output.joinpath(tarname) + with tarfile.open(tarpath, "w:gz") as tar: + tar.add(release_exe) + print(f"Wrote tarfile to '{tarpath}'")