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

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

Issue 2875773003: Roll 50: Updated for push to origin/master. (Closed)
Patch Set: Roll 50: Updated to latest Created 3 years, 7 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
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 28 matching lines...) Expand all
39 'ia32': 'ia32', 39 'ia32': 'ia32',
40 40
41 '64': 'x64', 41 '64': 'x64',
42 'x64': 'x64', 42 'x64': 'x64',
43 } 43 }
44 44
45 class Channel(object): 45 class Channel(object):
46 BLEEDING_EDGE = 'be' 46 BLEEDING_EDGE = 'be'
47 DEV = 'dev' 47 DEV = 'dev'
48 STABLE = 'stable' 48 STABLE = 'stable'
49 ALL_CHANNELS = [BLEEDING_EDGE, DEV, STABLE] 49 INTEGRATION = 'integration'
50 ALL_CHANNELS = [BLEEDING_EDGE, DEV, STABLE, INTEGRATION]
50 51
51 class ReleaseType(object): 52 class ReleaseType(object):
52 RAW = 'raw' 53 RAW = 'raw'
53 SIGNED = 'signed' 54 SIGNED = 'signed'
54 RELEASE = 'release' 55 RELEASE = 'release'
55 ALL_TYPES = [RAW, SIGNED, RELEASE] 56 ALL_TYPES = [RAW, SIGNED, RELEASE]
56 57
57 class Mode(object): 58 class Mode(object):
58 RELEASE = 'release' 59 RELEASE = 'release'
59 DEBUG = 'debug' 60 DEBUG = 'debug'
60 ALL_MODES = [RELEASE, DEBUG] 61 ALL_MODES = [RELEASE, DEBUG]
61 62
62 class GCSNamer(object): 63 class GCSNamer(object):
63 """ 64 """
64 This class is used for naming objects in our "gs://dart-archive/" 65 This class is used for naming objects in our "gs://dart-archive/"
65 GoogleCloudStorage bucket. It's structure is as follows: 66 GoogleCloudStorage bucket. It's structure is as follows:
66 67
67 For every (channel,revision,release-type) tuple we have a base path: 68 For every (channel,revision,release-type) tuple we have a base path:
68 69
69 gs://dart-archive/channels/{be,dev,stable} 70 gs://dart-archive/channels/{be,dev,stable,integration}
70 /{raw,signed,release}/{revision,latest}/ 71 /{raw,signed,release}/{revision,latest}/
71 72
72 Under every base path, the following structure is used: 73 Under every base path, the following structure is used:
73 - /VERSION 74 - /VERSION
74 - /api-docs/dartdocs-gen-api.zip 75 - /api-docs/dartdocs-gen-api.zip
75 - /dartium/{chromedriver,content_shell,dartium} 76 - /dartium/{chromedriver,content_shell,dartium}
76 -{linux,macos,windows}-{ia32,x64}-release.zip 77 -{linux,macos,windows}-{ia32,x64}-release.zip
77 - /sdk/dartsdk-{linux,macos,windows}-{ia32,x64}-release.zip 78 - /sdk/dartsdk-{linux,macos,windows}-{ia32,x64}-release.zip
78 - /editor/darteditor-{linux,macos,windows}-{ia32,x64}.zip 79 - /editor/darteditor-{linux,macos,windows}-{ia32,x64}.zip
79 - /editor/darteditor-installer-macos-{ia32,x64}.dmg 80 - /editor/darteditor-installer-macos-{ia32,x64}.dmg
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 print "SHA256 checksum of %s is %s" % (filename, checksum) 370 print "SHA256 checksum of %s is %s" % (filename, checksum)
370 return checksum_filename 371 return checksum_filename
371 372
372 def GetChannelFromName(name): 373 def GetChannelFromName(name):
373 """Get the channel from the name. Bleeding edge builders don't 374 """Get the channel from the name. Bleeding edge builders don't
374 have a suffix.""" 375 have a suffix."""
375 channel_name = string.split(name, '-').pop() 376 channel_name = string.split(name, '-').pop()
376 if channel_name in Channel.ALL_CHANNELS: 377 if channel_name in Channel.ALL_CHANNELS:
377 return channel_name 378 return channel_name
378 return Channel.BLEEDING_EDGE 379 return Channel.BLEEDING_EDGE
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698