Chromium Code Reviews| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 footer_file = os.path.join(bot_utils.DART_DIR, | 54 footer_file = os.path.join(bot_utils.DART_DIR, |
| 55 'tools', 'bots', 'dartdoc_footer.html') | 55 'tools', 'bots', 'dartdoc_footer.html') |
| 56 url = 'https://api.dartlang.org/stable' | 56 url = 'https://api.dartlang.org/stable' |
| 57 with bot.BuildStep('Build API docs by dartdoc'): | 57 with bot.BuildStep('Build API docs by dartdoc'): |
| 58 bot_utils.run([dart_exe, dartdoc_dart, | 58 bot_utils.run([dart_exe, dartdoc_dart, |
| 59 '--sdk-docs','--output', dirname, '--dart-sdk', dart_sdk, | 59 '--sdk-docs','--output', dirname, '--footer' , footer_file, |
| 60 '--footer' , footer_file, '--rel-canonical-prefix=' + url]) | 60 '--rel-canonical-prefix=' + url]) |
|
Bill Hesse
2016/11/29 16:23:35
Indentation
| |
| 61 | 61 |
| 62 def CreateUploadVersionFile(): | 62 def CreateUploadVersionFile(): |
| 63 file_path = os.path.join(bot_utils.DART_DIR, | 63 file_path = os.path.join(bot_utils.DART_DIR, |
| 64 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), | 64 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), |
| 65 'VERSION') | 65 'VERSION') |
| 66 with open(file_path, 'w') as fd: | 66 with open(file_path, 'w') as fd: |
| 67 fd.write(utils.GetVersionFileContent()) | 67 fd.write(utils.GetVersionFileContent()) |
| 68 DartArchiveUploadVersionFile(file_path) | 68 DartArchiveUploadVersionFile(file_path) |
| 69 | 69 |
| 70 def DartArchiveUploadVersionFile(version_file): | 70 def DartArchiveUploadVersionFile(version_file): |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 237 | 237 |
| 238 if __name__ == '__main__': | 238 if __name__ == '__main__': |
| 239 # 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 |
| 240 force = CHANNEL != bot_utils.Channel.BLEEDING_EDGE | 240 force = CHANNEL != bot_utils.Channel.BLEEDING_EDGE |
| 241 bot.Clobber(force=force) | 241 bot.Clobber(force=force) |
| 242 | 242 |
| 243 CreateUploadSDK() | 243 CreateUploadSDK() |
| 244 if BUILD_OS == 'linux': | 244 if BUILD_OS == 'linux': |
| 245 CreateUploadVersionFile() | 245 CreateUploadVersionFile() |
| 246 CreateUploadAPIDocs() | 246 CreateUploadAPIDocs() |
| OLD | NEW |