| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 # Dart Editor promote tools. | 7 # Dart Editor promote tools. |
| 8 | 8 |
| 9 import imp | 9 import imp |
| 10 import optparse | 10 import optparse |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 # Make sure options.channel is a valid | 70 # Make sure options.channel is a valid |
| 71 if not options.channel: | 71 if not options.channel: |
| 72 die('Specify --channel=be/dev/stable') | 72 die('Specify --channel=be/dev/stable') |
| 73 if options.channel not in bot_utils.Channel.ALL_CHANNELS: | 73 if options.channel not in bot_utils.Channel.ALL_CHANNELS: |
| 74 die('You must supply a valid channel to --channel to promote') | 74 die('You must supply a valid channel to --channel to promote') |
| 75 else: | 75 else: |
| 76 die('Invalid command specified: {0}. See help below'.format(args[0])) | 76 die('Invalid command specified: {0}. See help below'.format(args[0])) |
| 77 | 77 |
| 78 if command == 'promote': | 78 if command == 'promote': |
| 79 _PromoteDartArchiveBuild(options.channel, options.revision) | 79 _PromoteDartArchiveBuild(options.channel, options.revision) |
| 80 # FIXME/TODO(kustermann,ricow): Implement Api documentation upload/refresh. | |
| 81 # Issue: http://dartbug.com/14901 | |
| 82 ## UpdateDocs() | |
| 83 | 80 |
| 84 | 81 |
| 85 def UpdateDocs(): | 82 def UpdateDocs(): |
| 86 try: | 83 try: |
| 87 print 'Updating docs' | 84 print 'Updating docs' |
| 88 url = "http://api.dartlang.org/docs/releases/latest/?force_reload=true" | 85 url = "http://api.dartlang.org/docs/releases/latest/?force_reload=true" |
| 89 f = urllib.urlopen(url) | 86 f = urllib.urlopen(url) |
| 90 f.read() | 87 f.read() |
| 91 print 'Successfully updated api docs' | 88 print 'Successfully updated api docs' |
| 92 except Exception as e: | 89 except Exception as e: |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 promote(revision) | 166 promote(revision) |
| 170 promote('latest') | 167 promote('latest') |
| 171 | 168 |
| 172 def Gsutil(cmd): | 169 def Gsutil(cmd): |
| 173 gsutilTool = join(DART_PATH, 'third_party', 'gsutil', 'gsutil') | 170 gsutilTool = join(DART_PATH, 'third_party', 'gsutil', 'gsutil') |
| 174 bot_utils.run([sys.executable, gsutilTool] + cmd) | 171 bot_utils.run([sys.executable, gsutilTool] + cmd) |
| 175 | 172 |
| 176 | 173 |
| 177 if __name__ == '__main__': | 174 if __name__ == '__main__': |
| 178 sys.exit(main()) | 175 sys.exit(main()) |
| OLD | NEW |