mirror of https://github.com/gorhill/uBlock.git
use plain version string: uBO will render itself to b/rc if needed
This commit is contained in:
parent
30eb2cbb52
commit
2da91b8aef
|
@ -21,21 +21,15 @@ with open(firefox_manifest_file) as f2:
|
||||||
firefox_manifest = json.load(f2)
|
firefox_manifest = json.load(f2)
|
||||||
|
|
||||||
match = re.search('^(\d+\.\d+\.\d+)(\.\d+)$', version)
|
match = re.search('^(\d+\.\d+\.\d+)(\.\d+)$', version)
|
||||||
if match:
|
if not 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
|
|
||||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1459007
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=1459007
|
||||||
# By design Firefox opens the sidebar with new installation of
|
# By design Firefox opens the sidebar with new installation of
|
||||||
# uBO when sidebar_action is present in the manifest.
|
# uBO when sidebar_action is present in the manifest.
|
||||||
# Remove sidebarAction support for stable release of uBO.
|
# Remove sidebarAction support for stable release of uBO.
|
||||||
del firefox_manifest['sidebar_action']
|
del firefox_manifest['sidebar_action']
|
||||||
|
|
||||||
|
firefox_manifest['version'] = version
|
||||||
|
|
||||||
with open(firefox_manifest_file, 'w') as f2:
|
with open(firefox_manifest_file, 'w') as f2:
|
||||||
json.dump(firefox_manifest, f2, indent=2, separators=(',', ': '), sort_keys=True)
|
json.dump(firefox_manifest, f2, indent=2, separators=(',', ': '), sort_keys=True)
|
||||||
f2.write('\n')
|
f2.write('\n')
|
||||||
|
|
Loading…
Reference in New Issue