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

Side by Side Diff: download_apprtc_appengine_and_mercurial.py

Issue 1565173002: Download a prebuilt apprtc from google storage instead of building it. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/webrtc/webrtc.DEPS@master
Patch Set: Created 4 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « download_appengine_and_mercurial.py ('k') | node/linux/node.tar.gz.sha1 » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Downloads the appengine SDK from WebRTC storage and unpacks it. 6 """Downloads the appengine SDK from WebRTC storage and unpacks it.
7 7
8 Requires that depot_tools is installed and in the PATH. This script expects 8 Requires that depot_tools is installed and in the PATH. This script expects
9 to run with Chrome's base dir as the working directory, e.g. where the .gclient 9 to run with Chrome's base dir as the working directory, e.g. where the .gclient
10 file is. This is what should happen if this script is invoked as a hook action. 10 file is. This is what should happen if this script is invoked as a hook action.
(...skipping 26 matching lines...) Expand all
37 if len(argv) == 1: 37 if len(argv) == 1:
38 return 'Usage: %s <path to webrtc.DEPS>' % argv[0] 38 return 'Usage: %s <path to webrtc.DEPS>' % argv[0]
39 39
40 webrtc_deps_path = argv[1] 40 webrtc_deps_path = argv[1]
41 appengine_zip_path = os.path.join(webrtc_deps_path, 'google-appengine.zip') 41 appengine_zip_path = os.path.join(webrtc_deps_path, 'google-appengine.zip')
42 old_appengine_sha1 = utils.ComputeSHA1(appengine_zip_path) 42 old_appengine_sha1 = utils.ComputeSHA1(appengine_zip_path)
43 43
44 mercurial_tar_path = os.path.join(webrtc_deps_path, 'mercurial-src.tar.gz') 44 mercurial_tar_path = os.path.join(webrtc_deps_path, 'mercurial-src.tar.gz')
45 old_mercurial_sha1 = utils.ComputeSHA1(mercurial_tar_path) 45 old_mercurial_sha1 = utils.ComputeSHA1(mercurial_tar_path)
46 46
47 apprtc_zip_path = os.path.join(webrtc_deps_path, 'prebuilt_apprtc.zip')
48 old_apprtc_sha1 = utils.ComputeSHA1(mercurial_tar_path)
49
47 _DownloadResources(webrtc_deps_path) 50 _DownloadResources(webrtc_deps_path)
48 51
49 if old_appengine_sha1 != utils.ComputeSHA1(appengine_zip_path): 52 if old_appengine_sha1 != utils.ComputeSHA1(appengine_zip_path):
50 utils.DeleteDirNextToGclient('google_appengine') 53 utils.DeleteDirNextToGclient('google_appengine')
51 utils.UnpackToWorkingDir(appengine_zip_path) 54 utils.UnpackToWorkingDir(appengine_zip_path)
52 55
53 if old_mercurial_sha1 != utils.ComputeSHA1(mercurial_tar_path): 56 if old_mercurial_sha1 != utils.ComputeSHA1(mercurial_tar_path):
54 utils.DeleteDirNextToGclient('mercurial') 57 utils.DeleteDirNextToGclient('mercurial')
55 utils.UnpackToWorkingDir(mercurial_tar_path) 58 utils.UnpackToWorkingDir(mercurial_tar_path)
56 _StripVersionNumberFromMercurialFolder() 59 _StripVersionNumberFromMercurialFolder()
57 60
61 if old_apprtc_sha1 != utils.ComputeSHA1(apprtc_zip_path):
62 utils.DeleteDirNextToGclient('apprtc')
63 utils.UnpackToWorkingDir(apprtc_zip_path)
64
58 if __name__ == '__main__': 65 if __name__ == '__main__':
59 sys.exit(main(sys.argv)) 66 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « download_appengine_and_mercurial.py ('k') | node/linux/node.tar.gz.sha1 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698