From 7fe01d647005cc71571420e9a394c3bca2c31e5a Mon Sep 17 00:00:00 2001 From: Alex Pyrgiotis Date: Mon, 3 Apr 2023 17:58:01 +0300 Subject: [PATCH] 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. --- install/windows/build-wxs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/windows/build-wxs.py b/install/windows/build-wxs.py index a926afb..39093a4 100644 --- a/install/windows/build-wxs.py +++ b/install/windows/build-wxs.py @@ -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__)))),