diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json index 2481512..b9d93db 100644 --- a/platform/chromium/manifest.json +++ b/platform/chromium/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uMatrix", "short_name": "uMatrix", - "version": "0.9.9", + "version": "0.9.9.3", "description": "__MSG_extShortDesc__", "icons": { "16": "img/icon_16.png", diff --git a/tools/make-firefox-meta.py b/tools/make-firefox-meta.py index 36550a1..8aa2f4e 100644 --- a/tools/make-firefox-meta.py +++ b/tools/make-firefox-meta.py @@ -2,6 +2,7 @@ import os import json +import re import sys from io import open from shutil import rmtree @@ -76,8 +77,15 @@ with open(chromium_manifest, encoding='utf-8') as m: # https://developer.mozilla.org/en-US/Add-ons/AMO/Policy/Maintenance#How_do_I_submit_a_Beta_add-on.3F # "To create a beta channel [...] '(a|alpha|b|beta|pre|rc)\d*$' " -if sys.argv[2]: - manifest['version'] += sys.argv[2] + +match = re.search('^(\d+\.\d+\.\d+)(\.\d+)$', manifest['version']) +if match: + buildtype = int(match.group(2)[1:]) + if buildtype < 100: + builttype = 'b' + str(buildtype) + else: + builttype = 'rc' + str(buildtype - 100) + manifest['version'] = match.group(1) + builttype manifest['homepage'] = 'https://github.com/gorhill/uMatrix' manifest['description'] = escape(descriptions['en']) diff --git a/tools/make-firefox.sh b/tools/make-firefox.sh index 52a1132..a00f0e1 100755 --- a/tools/make-firefox.sh +++ b/tools/make-firefox.sh @@ -29,7 +29,7 @@ cp platform/firefox/*.xul $DES/ cp LICENSE.txt $DES/ echo "*** uMatrix.firefox: Generating meta..." -python tools/make-firefox-meta.py $DES/ "$2" +python tools/make-firefox-meta.py $DES/ if [ "$1" = all ]; then echo "*** uMatrix.firefox: Creating package..."