From f3f9df9b639cfaa0468efe16d126e73bd3ad6817 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sat, 29 Oct 2022 17:11:54 +0200 Subject: [PATCH] fix filenames, test final Windows installer (#5691) --- release/README.md | 1 + release/build.py | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/release/README.md b/release/README.md index 3f5b37035..289a6797b 100644 --- a/release/README.md +++ b/release/README.md @@ -5,6 +5,7 @@ 3. The spawned workflow runs will require manual confirmation on GitHub which you need to approve twice: https://github.com/mitmproxy/mitmproxy/actions 4. Once everything has been deployed, update the website. +5. Verify that the front-page download links for all platforms are working. ### GitHub Releases diff --git a/release/build.py b/release/build.py index 6dcac5536..2f33b3843 100644 --- a/release/build.py +++ b/release/build.py @@ -78,9 +78,9 @@ class ZipFile2(zipfile.ZipFile): def archive(path: Path) -> tarfile.TarFile | ZipFile2: if platform.system() == "Windows": - return ZipFile2(path.with_suffix(".zip"), "w") + return ZipFile2(path.with_name(f"{path.name}.zip"), "w") else: - return tarfile.open(path.with_suffix(".tar.gz"), "w:gz") + return tarfile.open(path.with_name(f"{path.name}.tar.gz"), "w:gz") def version() -> str: @@ -251,7 +251,16 @@ def installbuilder_installer(): ) installer = DIST_DIR / f"mitmproxy-{version()}-windows-x64-installer.exe" assert installer.exists() - assert installer.stat().st_size > 10 * 1024 * 1024 # sanity check that files are included: we expect at least 10mb. + + print("Run installer...") + subprocess.run( + [installer, "--mode", "unattended", "--unattendedmodeui", "none"], check=True + ) + MITMPROXY_INSTALL_DIR = Path(rf"C:\Program Files\mitmproxy\bin") + for tool in ["mitmproxy", "mitmdump", "mitmweb"]: + executable = (MITMPROXY_INSTALL_DIR / tool).with_suffix(".exe") + print(f"> {executable} --version") + subprocess.check_call([executable, "--version"]) if __name__ == "__main__":