| 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 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 '--arch=x64', 'create_sdk'], env=sysroot_env) | 44 '--arch=x64', 'create_sdk'], env=sysroot_env) |
| 45 | 45 |
| 46 def BuildDartdocAPIDocs(dirname): | 46 def BuildDartdocAPIDocs(dirname): |
| 47 dart_sdk = os.path.join(bot_utils.DART_DIR, | 47 dart_sdk = os.path.join(bot_utils.DART_DIR, |
| 48 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), | 48 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), |
| 49 'dart-sdk') | 49 'dart-sdk') |
| 50 dart_exe = os.path.join(dart_sdk, 'bin', 'dart') | 50 dart_exe = os.path.join(dart_sdk, 'bin', 'dart') |
| 51 dartdoc_dart = os.path.join(bot_utils.DART_DIR, | 51 dartdoc_dart = os.path.join(bot_utils.DART_DIR, |
| 52 'third_party', 'pkg' , 'dartdoc' , 'bin' , | 52 'third_party', 'pkg' , 'dartdoc' , 'bin' , |
| 53 'dartdoc.dart') | 53 'dartdoc.dart') |
| 54 packages_dir = os.path.join(bot_utils.DART_DIR, | |
| 55 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), | |
| 56 'packages') | |
| 57 footer_file = os.path.join(bot_utils.DART_DIR, | 54 footer_file = os.path.join(bot_utils.DART_DIR, |
| 58 'tools', 'bots', 'dartdoc_footer.html') | 55 'tools', 'bots', 'dartdoc_footer.html') |
| 59 url = 'https://api.dartlang.org/stable' | 56 url = 'https://api.dartlang.org/stable' |
| 60 with bot.BuildStep('Build API docs by dartdoc'): | 57 with bot.BuildStep('Build API docs by dartdoc'): |
| 61 bot_utils.run([dart_exe, '--package-root=' + packages_dir, dartdoc_dart, | 58 bot_utils.run([dart_exe, dartdoc_dart, |
| 62 '--sdk-docs','--output', dirname, '--dart-sdk', dart_sdk, | 59 '--sdk-docs','--output', dirname, '--dart-sdk', dart_sdk, |
| 63 '--footer' , footer_file, '--rel-canonical-prefix=' + url]) | 60 '--footer' , footer_file, '--rel-canonical-prefix=' + url]) |
| 64 | 61 |
| 65 def CreateUploadVersionFile(): | 62 def CreateUploadVersionFile(): |
| 66 file_path = os.path.join(bot_utils.DART_DIR, | 63 file_path = os.path.join(bot_utils.DART_DIR, |
| 67 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), | 64 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), |
| 68 'VERSION') | 65 'VERSION') |
| 69 with open(file_path, 'w') as fd: | 66 with open(file_path, 'w') as fd: |
| 70 fd.write(utils.GetVersionFileContent()) | 67 fd.write(utils.GetVersionFileContent()) |
| 71 DartArchiveUploadVersionFile(file_path) | 68 DartArchiveUploadVersionFile(file_path) |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 237 |
| 241 if __name__ == '__main__': | 238 if __name__ == '__main__': |
| 242 # We always clobber the bot, to make sure releases are build from scratch | 239 # We always clobber the bot, to make sure releases are build from scratch |
| 243 force = CHANNEL != bot_utils.Channel.BLEEDING_EDGE | 240 force = CHANNEL != bot_utils.Channel.BLEEDING_EDGE |
| 244 bot.Clobber(force=force) | 241 bot.Clobber(force=force) |
| 245 | 242 |
| 246 CreateUploadSDK() | 243 CreateUploadSDK() |
| 247 if BUILD_OS == 'linux': | 244 if BUILD_OS == 'linux': |
| 248 CreateUploadVersionFile() | 245 CreateUploadVersionFile() |
| 249 CreateUploadAPIDocs() | 246 CreateUploadAPIDocs() |
| OLD | NEW |