Index: sitescripts/extensions/bin/updateUpdateManifests.py |
=================================================================== |
--- a/sitescripts/extensions/bin/updateUpdateManifests.py |
+++ b/sitescripts/extensions/bin/updateUpdateManifests.py |
@@ -19,27 +19,34 @@ |
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 |
+ |
+ |
+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': |