INNER CODE UNIT · Python

version

mtkennerly/ludusavi · tasks.py:37

def version(ctx):
    print(get_version())


@task
def legal(ctx):
    version = get_version()
    txt_name = f"ludusavi-v{version}-legal.txt"
    txt_path = ROOT / "dist" / txt_name
    try:
        ctx.run(f'cargo lichking bundle --file "{txt_path}"', hide=True)
    except Exception:
        pass
    raw = txt_path.read_text("utf8")
    normalized = re.sub(r"C:\\Users\\[^\\]+", "~", raw)
    txt_path.write_text(normalized, "utf8")

    zip_path = ROOT / "dist" / f"ludusavi-v{version}-legal.zip"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…