diff --git a/builders/windows-builder.py b/builders/windows-builder.py index 1fa6cd0..a0086f3 100644 --- a/builders/windows-builder.py +++ b/builders/windows-builder.py @@ -180,8 +180,12 @@ class WindowsBuilder(Builder): """ self._print_verbose('... Creating PortableApps appinfo file ...') config_dir = os.path.dirname(self.config_path) - self.portable_version = self.version.replace('-bzr', '.') - self.portable_version = self.portable_version + '.0' * (3 - self.portable_version.count('.')) + if '-bzr' in self.version: + 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, \ open(os.path.join(self.portable_dest_path, 'App', 'Appinfo', 'appinfo.ini'), 'w') as output_file: content = input_file.read()