From 6a5ac6974184610871844f6f3040f39f88bd330a Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sun, 19 Jun 2022 23:58:41 -0400 Subject: [PATCH] cx_Freeze cannot handle dev version strings --- desktop/setup-freeze.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desktop/setup-freeze.py b/desktop/setup-freeze.py index ccb5a541..63920e4d 100644 --- a/desktop/setup-freeze.py +++ b/desktop/setup-freeze.py @@ -108,6 +108,10 @@ if platform.system() == "Darwin" or platform.system() == "Linux": # Discover the version with open(os.path.join("..", "cli", "onionshare_cli", "resources", "version.txt")) as f: version = f.read().strip() + # change a version like 2.6.dev1 to just 2.6, for cx_Freeze's sake + last_digit = version[-1] + if version.endswith(f".dev{last_digit}"): + version = version[0:-4] # Build