mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 22:52:42 +01:00
feat: package tarball in script
This commit is contained in:
1 parent
c5edeb163d
commit
821f983f57
1 file changed
+7
-2
+7
-2
@@ -1,6 +1,7 @@
|
|||||||
import build
|
import build
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import tarfile
|
||||||
|
|
||||||
from importlib import metadata
|
from importlib import metadata
|
||||||
from pathlib import Path
|
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)
|
proc = subprocess.run(["cargo", "build", "--release"], env=env, cwd=pyapp_dir)
|
||||||
if proc.returncode == 0:
|
if proc.returncode == 0:
|
||||||
output_exe = root.joinpath("pyapp-latest/target/release/pyapp")
|
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)
|
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}'")
|
||||||
Reference in new issue
Block a user