| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2015, 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 os | 7 import os |
| 8 import os.path | 8 import os.path |
| 9 import shutil | 9 import shutil |
| 10 import sys | 10 import sys |
| 11 import subprocess | 11 import subprocess |
| 12 | 12 |
| 13 import bot | 13 import bot |
| 14 import bot_utils | 14 import bot_utils |
| 15 | 15 |
| 16 utils = bot_utils.GetUtils() | 16 utils = bot_utils.GetUtils() |
| 17 | 17 |
| 18 BUILD_OS = utils.GuessOS() | 18 BUILD_OS = utils.GuessOS() |
| 19 | 19 |
| 20 (bot_name, _) = bot.GetBotName() | 20 (bot_name, _) = bot.GetBotName() |
| 21 CHANNEL = bot_utils.GetChannelFromName(bot_name) | 21 CHANNEL = bot_utils.GetChannelFromName(bot_name) |
| 22 | 22 |
| 23 def BuildSDK(): | 23 def BuildSDK(): |
| 24 with bot.BuildStep('Build SDK'): | 24 with bot.BuildStep('Build SDK'): |
| 25 if BUILD_OS == 'linux': | 25 if BUILD_OS == 'linux': |
| 26 sysroot_env = dict(os.environ) | 26 sysroot_env = dict(os.environ) |
| 27 sysroot_env['DART_USE_WHEEZY'] = '1' | 27 sysroot_env['DART_USE_WHEEZY'] = '1' |
| 28 Run([sys.executable, './tools/generate_buildfiles.py', env=sysroot_env) | 28 Run([sys.executable, './tools/generate_buildfiles.py'], env=sysroot_env) |
| 29 Run([sys.executable, './tools/build.py', '--mode=release', | 29 Run([sys.executable, './tools/build.py', '--mode=release', |
| 30 '--arch=ia32', 'create_sdk']) | 30 '--arch=ia32', 'create_sdk']) |
| 31 Run([sys.executable, './tools/build.py', '--mode=release', | 31 Run([sys.executable, './tools/build.py', '--mode=release', |
| 32 '--arch=x64', 'create_sdk']) | 32 '--arch=x64', 'create_sdk']) |
| 33 | 33 |
| 34 def BuildDartdocAPIDocs(dirname): | 34 def BuildDartdocAPIDocs(dirname): |
| 35 dart_sdk = os.path.join(bot_utils.DART_DIR, | 35 dart_sdk = os.path.join(bot_utils.DART_DIR, |
| 36 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), | 36 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), |
| 37 'dart-sdk') | 37 'dart-sdk') |
| 38 dart_exe = os.path.join(dart_sdk, 'bin', 'dart') | 38 dart_exe = os.path.join(dart_sdk, 'bin', 'dart') |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 if __name__ == '__main__': | 226 if __name__ == '__main__': |
| 227 # We always clobber the bot, to make sure releases are build from scratch | 227 # We always clobber the bot, to make sure releases are build from scratch |
| 228 force = CHANNEL != bot_utils.Channel.BLEEDING_EDGE | 228 force = CHANNEL != bot_utils.Channel.BLEEDING_EDGE |
| 229 bot.Clobber(force=force) | 229 bot.Clobber(force=force) |
| 230 | 230 |
| 231 CreateUploadSDK() | 231 CreateUploadSDK() |
| 232 if BUILD_OS == 'linux': | 232 if BUILD_OS == 'linux': |
| 233 CreateUploadVersionFile() | 233 CreateUploadVersionFile() |
| 234 CreateUploadAPIDocs() | 234 CreateUploadAPIDocs() |
| OLD | NEW |