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.path | 7 import os.path |
8 import shutil | 8 import shutil |
9 import sys | 9 import sys |
10 import subprocess | 10 import subprocess |
(...skipping 24 matching lines...) Expand all Loading... |
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') |
39 dartdoc_dart = os.path.join(bot_utils.DART_DIR, | 39 dartdoc_dart = os.path.join(bot_utils.DART_DIR, |
40 'third_party', 'pkg' , 'dartdoc' , 'bin' , | 40 'third_party', 'pkg' , 'dartdoc' , 'bin' , |
41 'dartdoc.dart') | 41 'dartdoc.dart') |
42 packages_dir = os.path.join(bot_utils.DART_DIR, | 42 packages_dir = os.path.join(bot_utils.DART_DIR, |
43 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), | 43 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), |
44 'packages') | 44 'packages') |
| 45 footer_file = os.path.join(bot_utils.DART_DIR, |
| 46 'tools', 'bots', 'dartdoc_footer.html') |
45 with bot.BuildStep('Build API docs by dartdoc'): | 47 with bot.BuildStep('Build API docs by dartdoc'): |
46 subprocess.call([dart_exe, '--package-root=' + packages_dir, dartdoc_dart, | 48 subprocess.call([dart_exe, '--package-root=' + packages_dir, dartdoc_dart, |
47 '--sdk-docs','--output', dirname, '--dart-sdk', dart_sdk, | 49 '--sdk-docs','--output', dirname, '--dart-sdk', dart_sdk, |
48 '--package-root=%s' % packages_dir], | 50 '--footer' , footer_file, '--package-root=%s' % packages_dir
], |
49 stdout=open(os.devnull, 'wb')) | 51 stdout=open(os.devnull, 'wb')) |
50 | 52 |
51 def CreateUploadVersionFile(): | 53 def CreateUploadVersionFile(): |
52 file_path = os.path.join(bot_utils.DART_DIR, | 54 file_path = os.path.join(bot_utils.DART_DIR, |
53 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), | 55 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), |
54 'VERSION') | 56 'VERSION') |
55 with open(file_path, 'w') as fd: | 57 with open(file_path, 'w') as fd: |
56 fd.write(utils.GetVersionFileContent()) | 58 fd.write(utils.GetVersionFileContent()) |
57 DartArchiveUploadVersionFile(file_path) | 59 DartArchiveUploadVersionFile(file_path) |
58 | 60 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 249 |
248 if __name__ == '__main__': | 250 if __name__ == '__main__': |
249 # We always clobber the bot, to make sure releases are build from scratch | 251 # We always clobber the bot, to make sure releases are build from scratch |
250 force = CHANNEL != bot_utils.Channel.BLEEDING_EDGE | 252 force = CHANNEL != bot_utils.Channel.BLEEDING_EDGE |
251 bot.Clobber(force=force) | 253 bot.Clobber(force=force) |
252 | 254 |
253 CreateUploadSDK() | 255 CreateUploadSDK() |
254 if BUILD_OS == 'linux': | 256 if BUILD_OS == 'linux': |
255 CreateUploadVersionFile() | 257 CreateUploadVersionFile() |
256 CreateUploadAPIDocs() | 258 CreateUploadAPIDocs() |
OLD | NEW |