Browse Source

update tool scripts for proper versioning

pull/2/head
gorhill 7 years ago
parent
commit
cc7be90de4
  1. 2
      platform/chromium/manifest.json
  2. 12
      tools/make-firefox-meta.py
  3. 2
      tools/make-firefox.sh

2
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",

12
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'])

2
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..."

Loading…
Cancel
Save