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 subprocess | 10 import subprocess |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 self.editor_installer_zipfilename(system, arch, extension)]) | 104 self.editor_installer_zipfilename(system, arch, extension)]) |
105 | 105 |
106 def sdk_zipfilepath(self, revision, system, arch, mode): | 106 def sdk_zipfilepath(self, revision, system, arch, mode): |
107 return '/'.join([self.sdk_directory(revision), | 107 return '/'.join([self.sdk_directory(revision), |
108 self.sdk_zipfilename(system, arch, mode)]) | 108 self.sdk_zipfilename(system, arch, mode)]) |
109 | 109 |
110 def dartium_variant_zipfilepath(self, revision, name, system, arch, mode): | 110 def dartium_variant_zipfilepath(self, revision, name, system, arch, mode): |
111 return '/'.join([self.dartium_directory(revision), | 111 return '/'.join([self.dartium_directory(revision), |
112 self.dartium_variant_zipfilename(name, system, arch, mode)]) | 112 self.dartium_variant_zipfilename(name, system, arch, mode)]) |
113 | 113 |
| 114 def apidocs_zipfilepath(self, revision): |
| 115 return '/'.join([self.apidocs_directory(revision), |
| 116 self.apidocs_zipfilename()]) |
| 117 |
114 # Functions for querying gs:// directories | 118 # Functions for querying gs:// directories |
115 | 119 |
116 def dartium_directory(self, revision): | 120 def dartium_directory(self, revision): |
117 return self._variant_directory('dartium', revision) | 121 return self._variant_directory('dartium', revision) |
118 | 122 |
119 def sdk_directory(self, revision): | 123 def sdk_directory(self, revision): |
120 return self._variant_directory('sdk', revision) | 124 return self._variant_directory('sdk', revision) |
121 | 125 |
122 def editor_directory(self, revision): | 126 def editor_directory(self, revision): |
123 return self._variant_directory('editor', revision) | 127 return self._variant_directory('editor', revision) |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 if not mangled_filename: | 259 if not mangled_filename: |
256 mangled_filename = os.path.basename(filename) | 260 mangled_filename = os.path.basename(filename) |
257 | 261 |
258 checksum = CalculateChecksum(filename) | 262 checksum = CalculateChecksum(filename) |
259 checksum_filename = '%s.md5sum' % filename | 263 checksum_filename = '%s.md5sum' % filename |
260 | 264 |
261 with open(checksum_filename, 'w') as f: | 265 with open(checksum_filename, 'w') as f: |
262 f.write('%s *%s' % (checksum, mangled_filename)) | 266 f.write('%s *%s' % (checksum, mangled_filename)) |
263 | 267 |
264 return checksum_filename | 268 return checksum_filename |
OLD | NEW |