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 21 matching lines...) Expand all Loading... | |
32 dartdoc_dart = os.path.join(bot_utils.DART_DIR, | 32 dartdoc_dart = os.path.join(bot_utils.DART_DIR, |
33 'third_party', 'pkg' , 'dartdoc' , 'bin' , | 33 'third_party', 'pkg' , 'dartdoc' , 'bin' , |
34 'dartdoc.dart') | 34 'dartdoc.dart') |
35 packages_dir = os.path.join(bot_utils.DART_DIR, | 35 packages_dir = os.path.join(bot_utils.DART_DIR, |
36 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), | 36 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), |
37 'packages') | 37 'packages') |
38 footer_file = os.path.join(bot_utils.DART_DIR, | 38 footer_file = os.path.join(bot_utils.DART_DIR, |
39 'tools', 'bots', 'dartdoc_footer.html') | 39 'tools', 'bots', 'dartdoc_footer.html') |
40 url = 'https://api.dartlang.org/stable' | 40 url = 'https://api.dartlang.org/stable' |
41 with bot.BuildStep('Build API docs by dartdoc'): | 41 with bot.BuildStep('Build API docs by dartdoc'): |
42 subprocess.call([dart_exe, '--package-root=' + packages_dir, dartdoc_dart, | 42 bot_utils.run([dart_exe, '--package-root=' + packages_dir, dartdoc_dart, |
ricow1
2015/12/11 06:29:30
Just Run to be consistent with the rest of this fi
| |
43 '--sdk-docs','--output', dirname, '--dart-sdk', dart_sdk, | 43 '--sdk-docs','--output', dirname, '--dart-sdk', dart_sdk, |
44 '--footer' , footer_file, | 44 '--footer' , footer_file, '--rel-canonical-prefix=' + url]) |
45 '--rel-canonical-prefix=' + url], | |
46 stdout=open(os.devnull, 'wb')) | |
47 | 45 |
48 def CreateUploadVersionFile(): | 46 def CreateUploadVersionFile(): |
49 file_path = os.path.join(bot_utils.DART_DIR, | 47 file_path = os.path.join(bot_utils.DART_DIR, |
50 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), | 48 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), |
51 'VERSION') | 49 'VERSION') |
52 with open(file_path, 'w') as fd: | 50 with open(file_path, 'w') as fd: |
53 fd.write(utils.GetVersionFileContent()) | 51 fd.write(utils.GetVersionFileContent()) |
54 DartArchiveUploadVersionFile(file_path) | 52 DartArchiveUploadVersionFile(file_path) |
55 | 53 |
56 def DartArchiveUploadVersionFile(version_file): | 54 def DartArchiveUploadVersionFile(version_file): |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 | 203 |
206 if __name__ == '__main__': | 204 if __name__ == '__main__': |
207 # We always clobber the bot, to make sure releases are build from scratch | 205 # We always clobber the bot, to make sure releases are build from scratch |
208 force = CHANNEL != bot_utils.Channel.BLEEDING_EDGE | 206 force = CHANNEL != bot_utils.Channel.BLEEDING_EDGE |
209 bot.Clobber(force=force) | 207 bot.Clobber(force=force) |
210 | 208 |
211 CreateUploadSDK() | 209 CreateUploadSDK() |
212 if BUILD_OS == 'linux': | 210 if BUILD_OS == 'linux': |
213 CreateUploadVersionFile() | 211 CreateUploadVersionFile() |
214 CreateUploadAPIDocs() | 212 CreateUploadAPIDocs() |
OLD | NEW |