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

Side by Side Diff: tools/bots/bot_utils.py

Issue 343653009: Add archiving of android zip files. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 | « editor/build/build.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 # 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 platform 10 import platform
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 self.release_type, revision) 100 self.release_type, revision)
101 101
102 def editor_zipfilepath(self, revision, system, arch): 102 def editor_zipfilepath(self, revision, system, arch):
103 return '/'.join([self.editor_directory(revision), 103 return '/'.join([self.editor_directory(revision),
104 self.editor_zipfilename(system, arch)]) 104 self.editor_zipfilename(system, arch)])
105 105
106 def editor_installer_filepath(self, revision, system, arch, extension): 106 def editor_installer_filepath(self, revision, system, arch, extension):
107 return '/'.join([self.editor_directory(revision), 107 return '/'.join([self.editor_directory(revision),
108 self.editor_installer_filename(system, arch, extension)]) 108 self.editor_installer_filename(system, arch, extension)])
109 109
110 def editor_android_zipfilepath(self, revision):
111 return '/'.join([self.editor_directory(revision),
112 self.editor_android_zipfilename()])
113
110 def sdk_zipfilepath(self, revision, system, arch, mode): 114 def sdk_zipfilepath(self, revision, system, arch, mode):
111 return '/'.join([self.sdk_directory(revision), 115 return '/'.join([self.sdk_directory(revision),
112 self.sdk_zipfilename(system, arch, mode)]) 116 self.sdk_zipfilename(system, arch, mode)])
113 117
114 def dartium_variant_zipfilepath(self, revision, name, system, arch, mode): 118 def dartium_variant_zipfilepath(self, revision, name, system, arch, mode):
115 return '/'.join([self.dartium_directory(revision), 119 return '/'.join([self.dartium_directory(revision),
116 self.dartium_variant_zipfilename(name, system, arch, mode)]) 120 self.dartium_variant_zipfilename(name, system, arch, mode)])
117 121
118 def apidocs_zipfilepath(self, revision): 122 def apidocs_zipfilepath(self, revision):
119 return '/'.join([self.apidocs_directory(revision), 123 return '/'.join([self.apidocs_directory(revision),
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 def dartium_android_apk_filename(self, name, arch, mode): 166 def dartium_android_apk_filename(self, name, arch, mode):
163 return '%s-%s-%s.apk' % (name, arch, mode) 167 return '%s-%s-%s.apk' % (name, arch, mode)
164 168
165 def apidocs_zipfilename(self): 169 def apidocs_zipfilename(self):
166 return 'dart-api-docs.zip' 170 return 'dart-api-docs.zip'
167 171
168 def editor_zipfilename(self, system, arch): 172 def editor_zipfilename(self, system, arch):
169 return 'darteditor-%s-%s.zip' % ( 173 return 'darteditor-%s-%s.zip' % (
170 SYSTEM_RENAMES[system], ARCH_RENAMES[arch]) 174 SYSTEM_RENAMES[system], ARCH_RENAMES[arch])
171 175
176 def editor_android_zipfilename(self):
177 return 'android.zip'
178
172 def editor_installer_filename(self, system, arch, extension): 179 def editor_installer_filename(self, system, arch, extension):
173 assert extension in ['dmg', 'msi'] 180 assert extension in ['dmg', 'msi']
174 return 'darteditor-installer-%s-%s.%s' % ( 181 return 'darteditor-installer-%s-%s.%s' % (
175 SYSTEM_RENAMES[system], ARCH_RENAMES[arch], extension) 182 SYSTEM_RENAMES[system], ARCH_RENAMES[arch], extension)
176 183
177 def sdk_zipfilename(self, system, arch, mode): 184 def sdk_zipfilename(self, system, arch, mode):
178 assert mode in Mode.ALL_MODES 185 assert mode in Mode.ALL_MODES
179 return 'dartsdk-%s-%s-%s.zip' % ( 186 return 'dartsdk-%s-%s-%s.zip' % (
180 SYSTEM_RENAMES[system], ARCH_RENAMES[arch], mode) 187 SYSTEM_RENAMES[system], ARCH_RENAMES[arch], mode)
181 188
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 333
327 checksum = CalculateChecksum(filename) 334 checksum = CalculateChecksum(filename)
328 checksum_filename = '%s.md5sum' % filename 335 checksum_filename = '%s.md5sum' % filename
329 336
330 with open(checksum_filename, 'w') as f: 337 with open(checksum_filename, 'w') as f:
331 f.write('%s *%s' % (checksum, mangled_filename)) 338 f.write('%s *%s' % (checksum, mangled_filename))
332 339
333 return checksum_filename 340 return checksum_filename
334 341
335 def GetChannelFromName(name): 342 def GetChannelFromName(name):
336 """Get the channel from the name. Bleeding edge builders don't 343 """Get the channel from the name. Bleeding edge builders don't
337 have a suffix.""" 344 have a suffix."""
338 channel_name = string.split(name, '-').pop() 345 channel_name = string.split(name, '-').pop()
339 if channel_name in Channel.ALL_CHANNELS: 346 if channel_name in Channel.ALL_CHANNELS:
340 return channel_name 347 return channel_name
341 return Channel.BLEEDING_EDGE 348 return Channel.BLEEDING_EDGE
OLDNEW
« no previous file with comments | « editor/build/build.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698