install/windows: Remove -rc identifiers from version

Remove any -rc identifiers (e.g., 0.4.1-rc3) from the Dangerzone
version, if it includes them. If we don't remove them, then building
the MSI for Windows will fail as follows:

    error CNDL0108: The Product/@Version attribute's value, '0.4.1-rc3',
    is not a valid version. Legal version values should look like
    'x.x.x.x' where x is an integer from 0 to 65534.
This commit is contained in:
Alex Pyrgiotis 2023-04-03 17:58:01 +03:00
parent 6c7c0b615f
commit 7fe01d6470
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA

View file

@ -121,7 +121,9 @@ def main():
"version.txt",
)
with open(version_filename) as f:
version = f.read().strip()
# Read the Dangerzone version from share/version.txt, and remove any potential
# -rc markers.
version = f.read().strip().split("-")[0]
dist_dir = os.path.join(
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),