mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
use plain version string: uBO will render itself to b/rc if needed
This commit is contained in:
parent
30eb2cbb52
commit
2da91b8aef
1 changed files with 3 additions and 9 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue