fix filenames, test final Windows installer (#5691)
This commit is contained in:
parent
34b0600ef8
commit
f3f9df9b63
|
@ -5,6 +5,7 @@
|
||||||
3. The spawned workflow runs will require manual confirmation on GitHub which you need to approve twice:
|
3. The spawned workflow runs will require manual confirmation on GitHub which you need to approve twice:
|
||||||
https://github.com/mitmproxy/mitmproxy/actions
|
https://github.com/mitmproxy/mitmproxy/actions
|
||||||
4. Once everything has been deployed, update the website.
|
4. Once everything has been deployed, update the website.
|
||||||
|
5. Verify that the front-page download links for all platforms are working.
|
||||||
|
|
||||||
### GitHub Releases
|
### GitHub Releases
|
||||||
|
|
||||||
|
|
|
@ -78,9 +78,9 @@ class ZipFile2(zipfile.ZipFile):
|
||||||
|
|
||||||
def archive(path: Path) -> tarfile.TarFile | ZipFile2:
|
def archive(path: Path) -> tarfile.TarFile | ZipFile2:
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
return ZipFile2(path.with_suffix(".zip"), "w")
|
return ZipFile2(path.with_name(f"{path.name}.zip"), "w")
|
||||||
else:
|
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:
|
def version() -> str:
|
||||||
|
@ -251,7 +251,16 @@ def installbuilder_installer():
|
||||||
)
|
)
|
||||||
installer = DIST_DIR / f"mitmproxy-{version()}-windows-x64-installer.exe"
|
installer = DIST_DIR / f"mitmproxy-{version()}-windows-x64-installer.exe"
|
||||||
assert installer.exists()
|
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__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue