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

Side by Side Diff: native_client_sdk/src/build_tools/sdk_tools/update_manifest.py

Issue 8915012: Update NaCl SDK to push MouseLock fix. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « native_client_sdk/src/build_tools/sdk_tools/sdk_update.py ('k') | no next file » | 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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 '''Utility to update the SDK manifest file in the build_tools directory''' 6 '''Utility to update the SDK manifest file in the build_tools directory'''
7 7
8
8 import optparse 9 import optparse
9 import os 10 import os
10 import re 11 import re
11 import sdk_update
12 import string 12 import string
13 import subprocess 13 import subprocess
14 import sys 14 import sys
15 import urllib2 15 import urllib2
16 16
17 # Create the various paths of interest
18 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
19 SDK_SRC_DIR = os.path.dirname(os.path.dirname(SCRIPT_DIR))
20 SRC_DIR = os.path.dirname(os.path.dirname(SDK_SRC_DIR))
21 NACL_DIR = os.path.join(SRC_DIR, 'native_client')
22
23 sys.path.append(os.path.join(SDK_SRC_DIR, 'tools'))
24 sys.path.append(os.path.join(NACL_DIR, 'build'))
25
26 import sdk_update
27
17 HELP='''"Usage: %prog [-b bundle] [options]" 28 HELP='''"Usage: %prog [-b bundle] [options]"
18 29
19 Actions for particular bundles: 30 Actions for particular bundles:
20 sdk_tools: Upload the most recently built nacl_sdk.zip and sdk_tools.tgz 31 sdk_tools: Upload the most recently built nacl_sdk.zip and sdk_tools.tgz
21 files to the server and update the manifest file 32 files to the server and update the manifest file
22 pepper_??: Download the latest pepper builds off the appropriate branch, 33 pepper_??: Download the latest pepper builds off the appropriate branch,
23 upload these files to the appropriate location on the server, and 34 upload these files to the appropriate location on the server, and
24 update the manifest file. 35 update the manifest file.
25 <others>: Only update manifest file -- you'll need to upload the file yourself 36 <others>: Only update manifest file -- you'll need to upload the file yourself
26 ''' 37 '''
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 (options.bundle_version, options.bundle_revision)) 313 (options.bundle_version, options.bundle_revision))
303 root_url = options.root_url 314 root_url = options.root_url
304 if options.archive_id: 315 if options.archive_id:
305 # Support archive names like trunk.113440 or 17.0.963.3, which is how 316 # Support archive names like trunk.113440 or 17.0.963.3, which is how
306 # the Chrome builders archive things. 317 # the Chrome builders archive things.
307 root_url = '/'.join([root_url, options.archive_id]) 318 root_url = '/'.join([root_url, options.archive_id])
308 else: 319 else:
309 # This is the old archive naming scheme 320 # This is the old archive naming scheme
310 root_url = '%s/pepper_%s_%s' % (root_url, options.bundle_version, 321 root_url = '%s/pepper_%s_%s' % (root_url, options.bundle_version,
311 options.bundle_revision) 322 options.bundle_revision)
312 options.mac_arch_url = '/'.join([root_url, 'naclsdk_mac.tgz']) 323 options.mac_arch_url = '/'.join([root_url, 'naclsdk_mac.bz2'])
313 options.linux_arch_url = '/'.join([root_url, 'naclsdk_linux.tgz']) 324 options.linux_arch_url = '/'.join([root_url, 'naclsdk_linux.bz2'])
314 options.win_arch_url = '/'.join([root_url, 'naclsdk_win.exe']) 325 options.win_arch_url = '/'.join([root_url, 'naclsdk_win.bz2'])
315 326
316 def HandleBundles(self): 327 def HandleBundles(self):
317 '''Handles known bundles by automatically uploading files''' 328 '''Handles known bundles by automatically uploading files'''
318 bundle_name = self.options.bundle_name 329 bundle_name = self.options.bundle_name
330 print 'bundle_name=' + bundle_name
319 if bundle_name == BUNDLE_SDK_TOOLS: 331 if bundle_name == BUNDLE_SDK_TOOLS:
320 self._HandleSDKTools() 332 self._HandleSDKTools()
321 elif bundle_name.startswith('pepper'): 333 elif bundle_name.startswith('pepper'):
322 self._HandlePepper() 334 self._HandlePepper()
323 335
324 def UpdateWithOptions(self): 336 def UpdateWithOptions(self):
325 ''' Update the manifest file with the given options. Create the manifest 337 ''' Update the manifest file with the given options. Create the manifest
326 if it doesn't already exists. Raises an Error if the manifest doesn't 338 if it doesn't already exists. Raises an Error if the manifest doesn't
327 validate after updating. 339 validate after updating.
328 340
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 try: 454 try:
443 COMMANDS.get(args[0], CommandUnknown)(options, args, manifest_file) 455 COMMANDS.get(args[0], CommandUnknown)(options, args, manifest_file)
444 except Error as error: 456 except Error as error:
445 print "Error: %s" % error 457 print "Error: %s" % error
446 return 1 458 return 1
447 return 0 459 return 0
448 460
449 461
450 if __name__ == '__main__': 462 if __name__ == '__main__':
451 sys.exit(main(sys.argv[1:])) 463 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « native_client_sdk/src/build_tools/sdk_tools/sdk_update.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698