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

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

Issue 1514193002: use bot_utils.run to run dartdoc so that the bot will fail if there are errors (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | « no previous file | 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 21 matching lines...) Expand all
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
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()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698