OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2014, 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 json | 7 import json |
8 import re | 8 import re |
9 import sys | 9 import sys |
10 | 10 |
11 import bot | 11 import bot |
12 import bot_utils | 12 import bot_utils |
13 | 13 |
14 utils = bot_utils.GetUtils() | 14 utils = bot_utils.GetUtils() |
15 | 15 |
16 VERSION_BUILDER = r'version-checker' | 16 VERSION_BUILDER = r'versionchecker' |
17 | 17 |
18 def VersionConfig(name, is_buildbot): | 18 def VersionConfig(name, is_buildbot): |
19 version_pattern = re.match(VERSION_BUILDER, name) | 19 version_pattern = re.match(VERSION_BUILDER, name) |
20 if not version_pattern: | 20 if not version_pattern: |
21 return None | 21 return None |
22 # We don't really use this, but we create it anyway to use the standard | 22 # We don't really use this, but we create it anyway to use the standard |
23 # bot execution model. | 23 # bot execution model. |
24 return bot.BuildInfo('none', 'none', 'release', 'linux') | 24 return bot.BuildInfo('none', 'none', 'release', 'linux') |
25 | 25 |
26 def GetLatestVersionFromGCS(channel): | 26 def GetLatestVersionFromGCS(channel): |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 print 'Version currently building: %s' % version | 76 print 'Version currently building: %s' % version |
77 if not ValidateChannelVersion(latest_version, channel): | 77 if not ValidateChannelVersion(latest_version, channel): |
78 print "Validation failed" | 78 print "Validation failed" |
79 sys.exit(1) | 79 sys.exit(1) |
80 else: | 80 else: |
81 print 'Version file changed, sanity checks passed' | 81 print 'Version file changed, sanity checks passed' |
82 | 82 |
83 if __name__ == '__main__': | 83 if __name__ == '__main__': |
84 # We pass in None for build_step to avoid building. | 84 # We pass in None for build_step to avoid building. |
85 bot.RunBot(VersionConfig, VersionSteps, build_step=None) | 85 bot.RunBot(VersionConfig, VersionSteps, build_step=None) |
OLD | NEW |