Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Side by Side Diff: tools/bots/dart_sdk.py

Issue 1360823002: rev up dartdoc, markdown (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: split option into two args Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 19 matching lines...) Expand all
30 'dart-sdk') 30 'dart-sdk')
31 dart_exe = os.path.join(dart_sdk, 'bin', 'dart') 31 dart_exe = os.path.join(dart_sdk, 'bin', 'dart')
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 with bot.BuildStep('Build API docs by dartdoc'): 41 with bot.BuildStep('Build API docs by dartdoc'):
41 subprocess.call([dart_exe, '--package-root=' + packages_dir, dartdoc_dart, 42 subprocess.call([dart_exe, '--package-root=' + packages_dir, dartdoc_dart,
42 '--sdk-docs','--output', dirname, '--dart-sdk', dart_sdk, 43 '--sdk-docs','--output', dirname, '--dart-sdk', dart_sdk,
43 '--footer' , footer_file], 44 '--footer' , footer_file,
45 '--rel-canonical-prefix=' + url],
44 stdout=open(os.devnull, 'wb')) 46 stdout=open(os.devnull, 'wb'))
45 47
46 def CreateUploadVersionFile(): 48 def CreateUploadVersionFile():
47 file_path = os.path.join(bot_utils.DART_DIR, 49 file_path = os.path.join(bot_utils.DART_DIR,
48 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), 50 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'),
49 'VERSION') 51 'VERSION')
50 with open(file_path, 'w') as fd: 52 with open(file_path, 'w') as fd:
51 fd.write(utils.GetVersionFileContent()) 53 fd.write(utils.GetVersionFileContent())
52 DartArchiveUploadVersionFile(file_path) 54 DartArchiveUploadVersionFile(file_path)
53 55
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 205
204 if __name__ == '__main__': 206 if __name__ == '__main__':
205 # We always clobber the bot, to make sure releases are build from scratch 207 # We always clobber the bot, to make sure releases are build from scratch
206 force = CHANNEL != bot_utils.Channel.BLEEDING_EDGE 208 force = CHANNEL != bot_utils.Channel.BLEEDING_EDGE
207 bot.Clobber(force=force) 209 bot.Clobber(force=force)
208 210
209 CreateUploadSDK() 211 CreateUploadSDK()
210 if BUILD_OS == 'linux': 212 if BUILD_OS == 'linux':
211 CreateUploadVersionFile() 213 CreateUploadVersionFile()
212 CreateUploadAPIDocs() 214 CreateUploadAPIDocs()
OLDNEW
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698