use plain version string: uBO will render itself to b/rc if needed

This commit is contained in:
Raymond Hill 2018-06-01 08:12:44 -04:00
parent 30eb2cbb52
commit 2da91b8aef
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -21,21 +21,15 @@ with open(firefox_manifest_file) as f2:
firefox_manifest = json.load(f2)
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)
firefox_manifest['version'] = match.group(1) + builttype
else:
firefox_manifest['version'] = version
if not match:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1459007
# By design Firefox opens the sidebar with new installation of
# uBO when sidebar_action is present in the manifest.
# Remove sidebarAction support for stable release of uBO.
del firefox_manifest['sidebar_action']
firefox_manifest['version'] = version
with open(firefox_manifest_file, 'w') as f2:
json.dump(firefox_manifest, f2, indent=2, separators=(',', ': '), sort_keys=True)
f2.write('\n')