PICARD-1465: For Windows store version combine patch and build number

The Windows store allows only a 3 part version number (build number part is reserved for internal store use), but still requires increasing versions on each publication.


In order to be able to upload the same release version multiple times, combine the patch number and build number into a single integer with "patch * 100000 + build".

E.g. version 2.3.1 with build number 6858 would get a store version of 2.3.106858
This commit is contained in:
Philipp Wolfer
2020-01-14 21:20:19 +01:00
parent 8408c655ca
commit a5b85dfc47
2 changed files with 3 additions and 3 deletions

View File

@@ -245,12 +245,13 @@ 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 * 100000 + self.build_number, 0)
generate_file('appxmanifest.xml.in', 'appxmanifest.xml', {
'app-id': "MetaBrainzFoundationInc." + PICARD_APP_ID,
'display-name': PICARD_APP_NAME, # PICARD_DISPLAY_NAME, messed up name reservation.
'short-name': PICARD_APP_NAME,
'publisher': os.environ.get('PICARD_APPX_PUBLISHER', default_publisher),
'version': file_version_str,
'version': '.'.join([str(v) for v in store_version]),
})
elif sys.platform == 'linux':
self.run_command('build_appdata')