Index: sitescripts/extensions/bin/updateUpdateManifests.py |
=================================================================== |
--- a/sitescripts/extensions/bin/updateUpdateManifests.py |
+++ b/sitescripts/extensions/bin/updateUpdateManifests.py |
@@ -19,27 +19,39 @@ |
This script generates update manifests for all extensions and apps |
""" |
import os |
import re |
import sys |
import subprocess |
+import xml.dom.minidom as dom |
from ConfigParser import SafeConfigParser |
from buildtools.packagerGecko import KNOWN_APPS |
from buildtools.packagerSafari import get_developer_identifier |
from buildtools.xarfile import read_certificates_and_key |
from sitescripts.utils import get_config, get_template |
from sitescripts.extensions.utils import ( |
Configuration, getDownloadLinks, |
writeIEUpdateManifest, writeAndroidUpdateManifest) |
-from sitescripts.extensions.android import get_min_sdk_version |
+ |
+ |
+ANDROID_VERSIONS = ['1.0', '1.1', '1.5', '1.6', '2.0', '2.0.1', '2.1', |
Sebastian Noack
2016/09/22 16:14:52
Is this variable even used?
Vasily Kuznetsov
2016/09/23 16:33:35
Don't think so. It just seemed important so I copi
Sebastian Noack
2016/09/23 17:29:25
It was only used by get_min_android_version(), the
|
+ '2.2', '2.3', '2.3.3', '3.0', '3.1', '3.2', '4.0', |
+ '4.0.3', '4.1', '4.2', '4.3', '4.4'] |
+ |
+ |
+def get_min_sdk_version(repo, version): |
+ command = ['hg', 'cat', '-r', version, 'AndroidManifest.xml'] |
+ result = subprocess.check_output(command, cwd=repo.repository) |
+ uses_sdk = dom.parseString(result).getElementsByTagName('uses-sdk')[0] |
+ return uses_sdk.attributes['android:minSdkVersion'].value |
def readMetadata(repo, version): |
""" |
reads extension ID and compatibility information from metadata file in the |
extension's repository |
""" |
if repo.type == 'android': |