Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(923)

Unified Diff: build/android/play_services/update.py

Issue 1469913002: Cleanup gms update/preprocess scripts, roll android_tools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/play_services/preprocess.py ('k') | build/android/play_services/update_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/play_services/update.py
diff --git a/build/android/play_services/update.py b/build/android/play_services/update.py
index c6c8dcc1f13847e85b83f7e86df1049c17dd2f3e..9b97ed5c6bff776ed6149d08668350ca01f6fed7 100755
--- a/build/android/play_services/update.py
+++ b/build/android/play_services/update.py
@@ -151,7 +151,8 @@ def Download(args):
logging.info('Skipping, not on an android checkout.')
return 0
- paths = PlayServicesPaths(args.sdk_root)
+ config = utils.ConfigParser(args.config)
+ paths = PlayServicesPaths(args.sdk_root, config.version_xml_path)
if os.path.isdir(paths.package) and not os.access(paths.package, os.W_OK):
logging.error('Failed updating the Google Play Services library. '
@@ -167,7 +168,6 @@ def Download(args):
logging.info('Skipping, the Google Play services library is up to date.')
return 0
- config = utils.ConfigParser(args.config)
bucket_path = _VerifyBucketPathFormat(args.bucket,
config.version_number,
args.dry_run)
@@ -260,14 +260,13 @@ def Upload(args):
# disable breakpad to avoid spamming the logs.
breakpad.IS_ENABLED = False
- paths = PlayServicesPaths(args.sdk_root)
+ config = utils.ConfigParser(args.config)
+ paths = PlayServicesPaths(args.sdk_root, config.version_xml_path)
if not args.skip_git and utils.IsRepoDirty(constants.DIR_SOURCE_ROOT):
logging.error('The repo is dirty. Please commit or stash your changes.')
return -1
- config = utils.ConfigParser(args.config)
-
new_version_number = utils.GetVersionNumberFromLibraryResources(
paths.version_xml)
logging.debug('comparing versions: new=%d, old=%s',
@@ -473,7 +472,7 @@ class PlayServicesPaths(object):
'''
- def __init__(self, sdk_root):
+ def __init__(self, sdk_root, version_xml_path):
relative_package = os.path.join('extras', 'google', 'google_play_services')
relative_lib = os.path.join(relative_package, 'libproject',
'google-play-services_lib')
@@ -485,7 +484,7 @@ class PlayServicesPaths(object):
self.source_prop = os.path.join(self.package, 'source.properties')
self.lib = os.path.join(sdk_root, relative_lib)
- self.version_xml = os.path.join(self.lib, 'res', 'values', 'version.xml')
+ self.version_xml = os.path.join(self.lib, version_xml_path)
class DummyGsutil(download_from_google_storage.Gsutil):
« no previous file with comments | « build/android/play_services/preprocess.py ('k') | build/android/play_services/update_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698