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

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

Issue 28773003: Changes to annotated step scripts: dart-editor-installer-* builders will build installer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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') | tools/mac_build_editor_dmg.sh » ('j') | 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 subprocess 10 import subprocess
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 gs://dart-archive/channels/{be,dev,stable} 69 gs://dart-archive/channels/{be,dev,stable}
70 /{raw,signed,release}/{revision,latest}/ 70 /{raw,signed,release}/{revision,latest}/
71 71
72 Under every base path, the following structure is used: 72 Under every base path, the following structure is used:
73 - /VERSION 73 - /VERSION
74 - /api-docs/dart-api-docs.zip 74 - /api-docs/dart-api-docs.zip
75 - /dartium/{chromedriver,content_shell,dartium} 75 - /dartium/{chromedriver,content_shell,dartium}
76 -{linux,macos,windows}-{ia32,x64}-release.zip 76 -{linux,macos,windows}-{ia32,x64}-release.zip
77 - /sdk/dartsdk-{linux,macos,windows}-{ia32,x64}-release.zip 77 - /sdk/dartsdk-{linux,macos,windows}-{ia32,x64}-release.zip
78 - /editor/darteditor-{linux,macos,windows}-{ia32,x64}.zip 78 - /editor/darteditor-{linux,macos,windows}-{ia32,x64}.zip
79 - /editor/darteditor-installer-macos-{ia32,x64}.dmg
79 - /editor-eclipse-update 80 - /editor-eclipse-update
80 /{index.html,features/,plugins/,artifacts.jar,content.jar} 81 /{index.html,features/,plugins/,artifacts.jar,content.jar}
81 """ 82 """
82 def __init__(self, channel=Channel.BLEEDING_EDGE, 83 def __init__(self, channel=Channel.BLEEDING_EDGE,
83 release_type=ReleaseType.RAW): 84 release_type=ReleaseType.RAW):
84 assert channel in Channel.ALL_CHANNELS 85 assert channel in Channel.ALL_CHANNELS
85 assert release_type in ReleaseType.ALL_TYPES 86 assert release_type in ReleaseType.ALL_TYPES
86 87
87 self.channel = channel 88 self.channel = channel
88 self.release_type = release_type 89 self.release_type = release_type
89 self.bucket = 'gs://dart-archive' 90 self.bucket = 'gs://dart-archive'
90 91
91 # Functions for quering complete gs:// filepaths 92 # Functions for quering complete gs:// filepaths
92 93
93 def version_filepath(self, revision): 94 def version_filepath(self, revision):
94 return '%s/channels/%s/%s/%s/VERSION' % (self.bucket, self.channel, 95 return '%s/channels/%s/%s/%s/VERSION' % (self.bucket, self.channel,
95 self.release_type, revision) 96 self.release_type, revision)
96 97
97 def editor_zipfilepath(self, revision, system, arch): 98 def editor_zipfilepath(self, revision, system, arch):
98 return '/'.join([self.editor_directory(revision), 99 return '/'.join([self.editor_directory(revision),
99 self.editor_zipfilename(system, arch)]) 100 self.editor_zipfilename(system, arch)])
100 101
102 def editor_installer_zipfilepath(self, revision, system, arch, extension):
103 return '/'.join([self.editor_directory(revision),
104 self.editor_installer_zipfilename(system, arch, extension)])
105
101 def sdk_zipfilepath(self, revision, system, arch, mode): 106 def sdk_zipfilepath(self, revision, system, arch, mode):
102 return '/'.join([self.sdk_directory(revision), 107 return '/'.join([self.sdk_directory(revision),
103 self.sdk_zipfilename(system, arch, mode)]) 108 self.sdk_zipfilename(system, arch, mode)])
104 109
105 def dartium_variant_zipfilepath(self, revision, name, system, arch, mode): 110 def dartium_variant_zipfilepath(self, revision, name, system, arch, mode):
106 return '/'.join([self.dartium_directory(revision), 111 return '/'.join([self.dartium_directory(revision),
107 self.dartium_variant_zipfilename(name, system, arch, mode)]) 112 self.dartium_variant_zipfilename(name, system, arch, mode)])
108 113
109 # Functions for querying gs:// directories 114 # Functions for querying gs:// directories
110 115
(...skipping 21 matching lines...) Expand all
132 137
133 # Functions for quering filenames 138 # Functions for quering filenames
134 139
135 def apidocs_zipfilename(self): 140 def apidocs_zipfilename(self):
136 return 'dart-api-docs.zip' 141 return 'dart-api-docs.zip'
137 142
138 def editor_zipfilename(self, system, arch): 143 def editor_zipfilename(self, system, arch):
139 return 'darteditor-%s-%s.zip' % ( 144 return 'darteditor-%s-%s.zip' % (
140 SYSTEM_RENAMES[system], ARCH_RENAMES[arch]) 145 SYSTEM_RENAMES[system], ARCH_RENAMES[arch])
141 146
147 def editor_installer_zipfilename(self, system, arch, extension):
148 assert extension in ['dmg']
149 return 'darteditor-installer-%s-%s.%s' % (
150 SYSTEM_RENAMES[system], ARCH_RENAMES[arch], extension)
151
142 def sdk_zipfilename(self, system, arch, mode): 152 def sdk_zipfilename(self, system, arch, mode):
143 assert mode in Mode.ALL_MODES 153 assert mode in Mode.ALL_MODES
144 return 'dartsdk-%s-%s-%s.zip' % ( 154 return 'dartsdk-%s-%s-%s.zip' % (
145 SYSTEM_RENAMES[system], ARCH_RENAMES[arch], mode) 155 SYSTEM_RENAMES[system], ARCH_RENAMES[arch], mode)
146 156
147 def dartium_variant_zipfilename(self, name, system, arch, mode): 157 def dartium_variant_zipfilename(self, name, system, arch, mode):
148 assert name in ['chromedriver', 'dartium', 'content_shell'] 158 assert name in ['chromedriver', 'dartium', 'content_shell']
149 assert mode in Mode.ALL_MODES 159 assert mode in Mode.ALL_MODES
150 return '%s-%s-%s-%s.zip' % ( 160 return '%s-%s-%s-%s.zip' % (
151 name, SYSTEM_RENAMES[system], ARCH_RENAMES[arch], mode) 161 name, SYSTEM_RENAMES[system], ARCH_RENAMES[arch], mode)
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 if not mangled_filename: 255 if not mangled_filename:
246 mangled_filename = os.path.basename(filename) 256 mangled_filename = os.path.basename(filename)
247 257
248 checksum = CalculateChecksum(filename) 258 checksum = CalculateChecksum(filename)
249 checksum_filename = '%s.md5sum' % filename 259 checksum_filename = '%s.md5sum' % filename
250 260
251 with open(checksum_filename, 'w') as f: 261 with open(checksum_filename, 'w') as f:
252 f.write('%s *%s' % (checksum, mangled_filename)) 262 f.write('%s *%s' % (checksum, mangled_filename))
253 263
254 return checksum_filename 264 return checksum_filename
OLDNEW
« no previous file with comments | « editor/build/build.py ('k') | tools/mac_build_editor_dmg.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698