1
0
mirror of https://gitlab.com/openlp/packaging.git synced 2024-12-22 21:12:50 +00:00

Always put the revision number at the end of the portable build number

This commit is contained in:
Raoul Snyman 2016-12-12 21:02:33 +02:00
parent 8efeae39f1
commit c5654e4256

View File

@ -180,8 +180,12 @@ class WindowsBuilder(Builder):
""" """
self._print_verbose('... Creating PortableApps appinfo file ...') self._print_verbose('... Creating PortableApps appinfo file ...')
config_dir = os.path.dirname(self.config_path) config_dir = os.path.dirname(self.config_path)
self.portable_version = self.version.replace('-bzr', '.') if '-bzr' in self.version:
self.portable_version = self.portable_version + '.0' * (3 - self.portable_version.count('.')) version, revision = self.version.split('-bzr')
version = version + '.0' * (2 - version.count('.'))
self.portable_version = version + '.' + revision
else:
self.portable_version = self.version + '.0' * (3 - self.version.count('.'))
with open(os.path.join(config_dir, 'appinfo.ini.default'), 'r') as input_file, \ with open(os.path.join(config_dir, 'appinfo.ini.default'), 'r') as input_file, \
open(os.path.join(self.portable_dest_path, 'App', 'Appinfo', 'appinfo.ini'), 'w') as output_file: open(os.path.join(self.portable_dest_path, 'App', 'Appinfo', 'appinfo.ini'), 'w') as output_file:
content = input_file.read() content = input_file.read()