mirror of
https://github.com/aclist/dztui.git
synced 2026-08-29 03:06:56 +02:00
chore: update release script
This commit is contained in:
parent
8a66bafe4c
commit
3d2e27bfe1
@ -5,11 +5,12 @@ import tarfile
|
|||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from prebuild import get_pyapp, rebuild_cpython
|
||||||
|
|
||||||
|
|
||||||
root = Path(__file__).resolve().parents[1]
|
root = Path(__file__).resolve().parents[1]
|
||||||
output = root.joinpath("dist")
|
output = root.joinpath("dist")
|
||||||
|
build_dir = root.joinpath("build")
|
||||||
pyapp_dir = root.joinpath("pyapp-latest")
|
|
||||||
cpython = root.joinpath("build/cpython/airgapped.tar.gz")
|
|
||||||
|
|
||||||
builder = build.ProjectBuilder(root)
|
builder = build.ProjectBuilder(root)
|
||||||
wheel = builder.build("wheel", output_directory=output)
|
wheel = builder.build("wheel", output_directory=output)
|
||||||
@ -20,8 +21,15 @@ metadata = stem.split("-")
|
|||||||
appname = metadata[0]
|
appname = metadata[0]
|
||||||
version = metadata[1]
|
version = metadata[1]
|
||||||
|
|
||||||
entrypoint = "dzgui.main:main"
|
pyapp_dir = build_dir.joinpath("pyapp-latest")
|
||||||
|
if pyapp_dir.is_dir() is False:
|
||||||
|
get_pyapp()
|
||||||
|
|
||||||
|
packaged_version = rebuild_cpython()
|
||||||
|
assert packaged_version == version
|
||||||
|
cpython = build_dir.joinpath("airgapped.tar.gz")
|
||||||
|
|
||||||
|
entrypoint = "dzgui.main:main"
|
||||||
env = os.environ
|
env = os.environ
|
||||||
env["PYAPP_PROJECT_VERSION"] = version
|
env["PYAPP_PROJECT_VERSION"] = version
|
||||||
env["PYAPP_PROJECT_NAME"] = appname
|
env["PYAPP_PROJECT_NAME"] = appname
|
||||||
@ -38,7 +46,7 @@ env["PYAPP_DISTRIBUTION_PYTHON_PATH"] = "python/bin/python3"
|
|||||||
|
|
||||||
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 = build_dir.joinpath("pyapp-latest/target/release/pyapp")
|
||||||
release_exe = output.joinpath(appname)
|
release_exe = output.joinpath(appname)
|
||||||
output_exe.rename(release_exe)
|
output_exe.rename(release_exe)
|
||||||
tarpath = output.joinpath(tarname)
|
tarpath = output.joinpath(tarname)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user