This commit is contained in:
Raymond Hill 2018-05-30 11:52:52 -04:00
parent 44224fe2c7
commit 4136a51ba3
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 6 additions and 9 deletions

View File

@ -20,16 +20,13 @@ webext_manifest_file = os.path.join(build_dir, 'manifest.json')
with open(webext_manifest_file) as f2:
webext_manifest = json.load(f2)
match = re.search('^(\d+\.\d+\.\d+)(\.\d+)$', version)
webext_manifest['version'] = version
match = re.search('^\d+\.\d+\.\d+\.\d+$', version)
if match:
buildtype = int(match.group(2)[1:])
if buildtype < 100:
builttype = 'b' + str(buildtype)
else:
builttype = 'rc' + str(buildtype - 100)
webext_manifest['version'] = match.group(1) + builttype
else:
webext_manifest['version'] = version
webext_manifest['name'] += ' development build'
webext_manifest['short_name'] += ' dev build'
webext_manifest['browser_action']['default_title'] += ' dev build'
with open(webext_manifest_file, 'w') as f2:
json.dump(webext_manifest, f2, indent=2, separators=(',', ': '), sort_keys=True)