From ecafcbe79dbfd666e6ca1ada55ecf1b30dc9baeb Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Wed, 7 Jun 2023 08:28:01 +0200 Subject: [PATCH] Update calculation of patch versions for Windows store For Windows store we combine the patch version with the build number to ensure continuously growing version numbers for upgrades. Reduce the version numbers to be multiplied to 1000 to allow for two digit patch version numbers. --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3f4b28815..745cf6d35 100644 --- a/setup.py +++ b/setup.py @@ -302,7 +302,10 @@ class picard_build(build): generate_file('win-version-info.txt.in', 'win-version-info.txt', {**args, **version_args}) default_publisher = 'CN=Metabrainz Foundation Inc., O=Metabrainz Foundation Inc., L=San Luis Obispo, S=California, C=US' - store_version = (PICARD_VERSION.major, PICARD_VERSION.minor, PICARD_VERSION.patch * 10000 + self.build_number, 0) + # Combine patch version with build number. As Windows store apps require continuously + # growing version numbers we combine the patch version with a build number set by the + # build script. + store_version = (PICARD_VERSION.major, PICARD_VERSION.minor, PICARD_VERSION.patch * 1000 + min(self.build_number, 999), 0) generate_file('appxmanifest.xml.in', 'appxmanifest.xml', { 'app-id': "MetaBrainzFoundationInc." + PICARD_APP_ID, 'display-name': PICARD_DISPLAY_NAME,