cx_Freeze cannot handle dev version strings

This commit is contained in:
Micah Lee 2022-06-19 23:58:41 -04:00
parent ac745dd041
commit 6a5ac69741
No known key found for this signature in database
GPG key ID: 403C2657CD994F73

View file

@ -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