| 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 import hashlib | 7 import hashlib |
| 8 import imp | 8 import imp |
| 9 import os | 9 import os |
| 10 import string | 10 import string |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 def __init__(self, channel=Channel.BLEEDING_EDGE, | 85 def __init__(self, channel=Channel.BLEEDING_EDGE, |
| 86 release_type=ReleaseType.RAW, internal=False): | 86 release_type=ReleaseType.RAW, internal=False): |
| 87 assert channel in Channel.ALL_CHANNELS | 87 assert channel in Channel.ALL_CHANNELS |
| 88 assert release_type in ReleaseType.ALL_TYPES | 88 assert release_type in ReleaseType.ALL_TYPES |
| 89 | 89 |
| 90 self.channel = channel | 90 self.channel = channel |
| 91 self.release_type = release_type | 91 self.release_type = release_type |
| 92 if internal: | 92 if internal: |
| 93 self.bucket = 'gs://dart-archive-internal' | 93 self.bucket = 'gs://dart-archive-internal' |
| 94 else: | 94 else: |
| 95 self.bucket = 'gs://dart-archive' | 95 self.bucket = 'gs://ricowtesting' |
| 96 | 96 |
| 97 # Functions for quering complete gs:// filepaths | 97 # Functions for quering complete gs:// filepaths |
| 98 | 98 |
| 99 def version_filepath(self, revision): | 99 def version_filepath(self, revision): |
| 100 return '%s/channels/%s/%s/%s/VERSION' % (self.bucket, self.channel, | 100 return '%s/channels/%s/%s/%s/VERSION' % (self.bucket, self.channel, |
| 101 self.release_type, revision) | 101 self.release_type, revision) |
| 102 | 102 |
| 103 def editor_zipfilepath(self, revision, system, arch): | 103 def editor_zipfilepath(self, revision, system, arch): |
| 104 return '/'.join([self.editor_directory(revision), | 104 return '/'.join([self.editor_directory(revision), |
| 105 self.editor_zipfilename(system, arch)]) | 105 self.editor_zipfilename(system, arch)]) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 128 | 128 |
| 129 def dartium_directory(self, revision): | 129 def dartium_directory(self, revision): |
| 130 return self._variant_directory('dartium', revision) | 130 return self._variant_directory('dartium', revision) |
| 131 | 131 |
| 132 def dartium_android_directory(self, revision): | 132 def dartium_android_directory(self, revision): |
| 133 return self._variant_directory('dartium_android', revision) | 133 return self._variant_directory('dartium_android', revision) |
| 134 | 134 |
| 135 def sdk_directory(self, revision): | 135 def sdk_directory(self, revision): |
| 136 return self._variant_directory('sdk', revision) | 136 return self._variant_directory('sdk', revision) |
| 137 | 137 |
| 138 def linux_packages_directory(self, revision, linux_system): |
| 139 return '/'.join([self._variant_directory('linux_packages', revision), |
| 140 linux_system]) |
| 141 |
| 142 def src_directory(self, revision): |
| 143 return self._variant_directory('src', revision) |
| 144 |
| 138 def editor_directory(self, revision): | 145 def editor_directory(self, revision): |
| 139 return self._variant_directory('editor', revision) | 146 return self._variant_directory('editor', revision) |
| 140 | 147 |
| 141 def editor_eclipse_update_directory(self, revision): | 148 def editor_eclipse_update_directory(self, revision): |
| 142 return self._variant_directory('editor-eclipse-update', revision) | 149 return self._variant_directory('editor-eclipse-update', revision) |
| 143 | 150 |
| 144 def apidocs_directory(self, revision): | 151 def apidocs_directory(self, revision): |
| 145 return self._variant_directory('api-docs', revision) | 152 return self._variant_directory('api-docs', revision) |
| 146 | 153 |
| 147 def misc_directory(self, revision): | 154 def misc_directory(self, revision): |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 321 |
| 315 return checksum_filename | 322 return checksum_filename |
| 316 | 323 |
| 317 def GetChannelFromName(name): | 324 def GetChannelFromName(name): |
| 318 """Get the channel from the name. Bleeding edge builders don't | 325 """Get the channel from the name. Bleeding edge builders don't |
| 319 have a suffix.""" | 326 have a suffix.""" |
| 320 channel_name = string.split(name, '-').pop() | 327 channel_name = string.split(name, '-').pop() |
| 321 if channel_name in Channel.ALL_CHANNELS: | 328 if channel_name in Channel.ALL_CHANNELS: |
| 322 return channel_name | 329 return channel_name |
| 323 return Channel.BLEEDING_EDGE | 330 return Channel.BLEEDING_EDGE |
| OLD | NEW |