mirror of https://github.com/gorhill/uBlock.git
fix webext build for chromium (https://github.com/gorhill/uBlock/issues/3716#issuecomment-393207176)
This commit is contained in:
parent
44224fe2c7
commit
4136a51ba3
|
@ -20,17 +20,14 @@ webext_manifest_file = os.path.join(build_dir, 'manifest.json')
|
||||||
with open(webext_manifest_file) as f2:
|
with open(webext_manifest_file) as f2:
|
||||||
webext_manifest = json.load(f2)
|
webext_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)
|
|
||||||
webext_manifest['version'] = match.group(1) + builttype
|
|
||||||
else:
|
|
||||||
webext_manifest['version'] = version
|
webext_manifest['version'] = version
|
||||||
|
|
||||||
|
match = re.search('^\d+\.\d+\.\d+\.\d+$', version)
|
||||||
|
if match:
|
||||||
|
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:
|
with open(webext_manifest_file, 'w') as f2:
|
||||||
json.dump(webext_manifest, f2, indent=2, separators=(',', ': '), sort_keys=True)
|
json.dump(webext_manifest, f2, indent=2, separators=(',', ': '), sort_keys=True)
|
||||||
f2.write('\n')
|
f2.write('\n')
|
||||||
|
|
Loading…
Reference in New Issue