From 4136a51ba345003de43ed1f8917b2c9b2c418923 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 30 May 2018 11:52:52 -0400 Subject: [PATCH] fix webext build for chromium (https://github.com/gorhill/uBlock/issues/3716#issuecomment-393207176) --- tools/make-webext-meta.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tools/make-webext-meta.py b/tools/make-webext-meta.py index 6fc340f4a..15f8946e5 100644 --- a/tools/make-webext-meta.py +++ b/tools/make-webext-meta.py @@ -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)