Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: sitescripts/extensions/bin/updateUpdateManifests.py

Issue 29354748: Fixes 4464 - Restore get_min_sdk_version() function from sitescripts.extensions.android module that… (Closed) Base URL: https://hg.adblockplus.org/sitescripts
Left Patch Set: Created Sept. 22, 2016, 4:03 p.m.
Right Patch Set: Mock plugin repositories instead of cloning them Created Sept. 27, 2016, 9:44 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | sitescripts/extensions/test/adblockplussafari.pem » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # This file is part of the Adblock Plus web scripts, 1 # This file is part of the Adblock Plus web scripts,
2 # Copyright (C) 2006-2016 Eyeo GmbH 2 # Copyright (C) 2006-2016 Eyeo GmbH
3 # 3 #
4 # Adblock Plus is free software: you can redistribute it and/or modify 4 # Adblock Plus is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License version 3 as 5 # it under the terms of the GNU General Public License version 3 as
6 # published by the Free Software Foundation. 6 # published by the Free Software Foundation.
7 # 7 #
8 # Adblock Plus is distributed in the hope that it will be useful, 8 # Adblock Plus is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
(...skipping 17 matching lines...) Expand all
28 from ConfigParser import SafeConfigParser 28 from ConfigParser import SafeConfigParser
29 29
30 from buildtools.packagerGecko import KNOWN_APPS 30 from buildtools.packagerGecko import KNOWN_APPS
31 from buildtools.packagerSafari import get_developer_identifier 31 from buildtools.packagerSafari import get_developer_identifier
32 from buildtools.xarfile import read_certificates_and_key 32 from buildtools.xarfile import read_certificates_and_key
33 33
34 from sitescripts.utils import get_config, get_template 34 from sitescripts.utils import get_config, get_template
35 from sitescripts.extensions.utils import ( 35 from sitescripts.extensions.utils import (
36 Configuration, getDownloadLinks, 36 Configuration, getDownloadLinks,
37 writeIEUpdateManifest, writeAndroidUpdateManifest) 37 writeIEUpdateManifest, writeAndroidUpdateManifest)
38
39
40 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
41 '2.2', '2.3', '2.3.3', '3.0', '3.1', '3.2', '4.0',
42 '4.0.3', '4.1', '4.2', '4.3', '4.4']
43 38
44 39
45 def get_min_sdk_version(repo, version): 40 def get_min_sdk_version(repo, version):
46 command = ['hg', 'cat', '-r', version, 'AndroidManifest.xml'] 41 command = ['hg', 'cat', '-r', version, 'AndroidManifest.xml']
47 result = subprocess.check_output(command, cwd=repo.repository) 42 result = subprocess.check_output(command, cwd=repo.repository)
48 uses_sdk = dom.parseString(result).getElementsByTagName('uses-sdk')[0] 43 uses_sdk = dom.parseString(result).getElementsByTagName('uses-sdk')[0]
49 return uses_sdk.attributes['android:minSdkVersion'].value 44 return uses_sdk.attributes['android:minSdkVersion'].value
50 45
51 46
52 def readMetadata(repo, version): 47 def readMetadata(repo, version):
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 """ 130 """
136 updates all update manifests with the current versions 131 updates all update manifests with the current versions
137 """ 132 """
138 133
139 parser = SafeConfigParser() 134 parser = SafeConfigParser()
140 getDownloadLinks(parser) 135 getDownloadLinks(parser)
141 writeUpdateManifest(parser) 136 writeUpdateManifest(parser)
142 137
143 if __name__ == '__main__': 138 if __name__ == '__main__':
144 updateUpdateManifests() 139 updateUpdateManifests()
LEFTRIGHT

Powered by Google App Engine
This is Rietveld