| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/env python | |
| 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 | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 import os | |
| 7 import subprocess | |
| 8 import sys | |
| 9 | |
| 10 ROOT = os.path.dirname(os.path.abspath(os.path.dirname(__file__))) | |
| 11 APPCFG = os.path.join(ROOT, '..', 'google_appengine', 'appcfg.py') | |
| 12 | |
| 13 INSTANCES = [ | |
| 14 'chromeos-status-hrd', | |
| 15 'chromium-status-hr', | |
| 16 'chromiumos-status-hr', | |
| 17 'dart-status', | |
| 18 'gyp-status-hrd', | |
| 19 'naclports-status-hrd', | |
| 20 'nativeclient-status-hrd', | |
| 21 'o3d-status-hr', | |
| 22 'v8-roll', | |
| 23 'v8-status', | |
| 24 'webrtc-status', | |
| 25 ] | |
| 26 | |
| 27 def main(): | |
| 28 if not sys.argv[1:]: | |
| 29 print('Usage: update.py <appcfg.py command> -V <version to use>') | |
| 30 print('Examples:') | |
| 31 print(' update.py update -V r94532') | |
| 32 print(' update.py set_default_version -V r94532') | |
| 33 print('') | |
| 34 print('The following instances will be affected:') | |
| 35 for instance in INSTANCES: | |
| 36 print(' %s' % instance) | |
| 37 print('') | |
| 38 return 1 | |
| 39 | |
| 40 command = sys.argv[1:] | |
| 41 for instance in INSTANCES: | |
| 42 print('\nDoing %s' % instance) | |
| 43 subprocess.check_call( | |
| 44 [sys.executable, APPCFG] + command + [ROOT, '-A', instance]) | |
| 45 return 0 | |
| 46 | |
| 47 | |
| 48 if __name__ == '__main__': | |
| 49 sys.exit(main()) | |
| OLD | NEW |