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 """ | 7 """ |
8 Buildbot steps for src tarball generation and debian package generation | 8 Buildbot steps for src tarball generation and debian package generation |
9 | 9 |
10 Package up the src of the dart repo and create a debian package. | 10 Package up the src of the dart repo and create a debian package. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 print 'Assumed installed, but could not find %s' % path | 92 print 'Assumed installed, but could not find %s' % path |
93 sys.exit(1) | 93 sys.exit(1) |
94 | 94 |
95 def SrcSteps(build_info): | 95 def SrcSteps(build_info): |
96 # We always clobber the bot, to not leave old tarballs and packages | 96 # We always clobber the bot, to not leave old tarballs and packages |
97 # floating around the out dir. | 97 # floating around the out dir. |
98 bot.Clobber(force=True) | 98 bot.Clobber(force=True) |
99 | 99 |
100 version = utils.GetVersion() | 100 version = utils.GetVersion() |
101 builddir = os.path.join(bot_utils.DART_DIR, | 101 builddir = os.path.join(bot_utils.DART_DIR, |
102 utils.GetBuildDir(HOST_OS, HOST_OS), | 102 utils.GetBuildDir(HOST_OS), |
103 'src_and_installation') | 103 'src_and_installation') |
104 | 104 |
105 if not os.path.exists(builddir): | 105 if not os.path.exists(builddir): |
106 os.makedirs(builddir) | 106 os.makedirs(builddir) |
107 tarfilename = 'dart-%s.tar.gz' % version | 107 tarfilename = 'dart-%s.tar.gz' % version |
108 tarfile = os.path.join(builddir, tarfilename) | 108 tarfile = os.path.join(builddir, tarfilename) |
109 | 109 |
110 with bot.BuildStep('Validating linux system'): | 110 with bot.BuildStep('Validating linux system'): |
111 print 'Validating that we are on %s' % build_info.builder_tag | 111 print 'Validating that we are on %s' % build_info.builder_tag |
112 args = ['cat', '/etc/os-release'] | 112 args = ['cat', '/etc/os-release'] |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 bot_name, _ = bot.GetBotName() | 175 bot_name, _ = bot.GetBotName() |
176 channel = bot_utils.GetChannelFromName(bot_name) | 176 channel = bot_utils.GetChannelFromName(bot_name) |
177 if channel != bot_utils.Channel.BLEEDING_EDGE: | 177 if channel != bot_utils.Channel.BLEEDING_EDGE: |
178 ArchiveArtifacts(tarfile, builddir, channel, build_info.builder_tag) | 178 ArchiveArtifacts(tarfile, builddir, channel, build_info.builder_tag) |
179 else: | 179 else: |
180 print 'Not uploading artifacts on bleeding edge' | 180 print 'Not uploading artifacts on bleeding edge' |
181 | 181 |
182 if __name__ == '__main__': | 182 if __name__ == '__main__': |
183 # We pass in None for build_step to avoid building the sdk. | 183 # We pass in None for build_step to avoid building the sdk. |
184 bot.RunBot(SrcConfig, SrcSteps, build_step=None) | 184 bot.RunBot(SrcConfig, SrcSteps, build_step=None) |
OLD | NEW |