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

Side by Side Diff: pkg/docgen/bin/upload_docgen.py

Issue 35743002: Make docgen able to generate pkg docs and save the package names (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make sure we have an ending newline in index.txt, also write a JSON index, and include packageName … Created 7 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, 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 """ This file will run docgen.dart on the SDK libraries, and upload them to 7 """ This file will run docgen.dart on the SDK libraries, and upload them to
8 Google Cloud Storage for the documentation viewer. 8 Google Cloud Storage for the documentation viewer.
9 """ 9 """
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 63
64 def main(): 64 def main():
65 GetOptions() 65 GetOptions()
66 66
67 SetGsutil() 67 SetGsutil()
68 68
69 # Execute Docgen.dart on the SDK. 69 # Execute Docgen.dart on the SDK.
70 ExecuteCommand([DART, '--checked', '--package-root=' + PACKAGE_ROOT, 70 ExecuteCommand([DART, '--checked', '--package-root=' + PACKAGE_ROOT,
71 abspath(join(dirname(__file__), 'docgen.dart')), 71 abspath(join(dirname(__file__), 'docgen.dart')),
72 '--parse-sdk']) 72 '--parse-sdk', '--json'])
73 73
74 # Use SVN Revision to get the revision number. 74 # Use SVN Revision to get the revision number.
75 revision = utils.GetSVNRevision() 75 revision = utils.GetSVNRevision()
76 if revision is None: 76 if revision is None:
77 # Try to find the version from the dart-sdk folder. 77 # Try to find the version from the dart-sdk folder.
78 revision_file_location = abspath(join(dirname(__file__), 78 revision_file_location = abspath(join(dirname(__file__),
79 '../../../%s/%s/dart-sdk/revision' % (utils.BUILD_ROOT[utils.GuessOS()], 79 '../../../%s/%s/dart-sdk/revision' % (utils.BUILD_ROOT[utils.GuessOS()],
80 utils.GetBuildConf('release', utils.GuessArchitecture())))) 80 utils.GetBuildConf('release', utils.GuessArchitecture()))))
81 with open(revision_file_location, 'r') as revision_file: 81 with open(revision_file_location, 'r') as revision_file:
82 revision = revision_file.readline(5) 82 revision = revision_file.readline(5)
(...skipping 12 matching lines...) Expand all
95 version_file.close() 95 version_file.close()
96 Upload('./VERSION', GS_SITE + '/VERSION') 96 Upload('./VERSION', GS_SITE + '/VERSION')
97 97
98 # Clean up the files it creates. 98 # Clean up the files it creates.
99 ExecuteCommand(['rm', '-rf', './docs']) 99 ExecuteCommand(['rm', '-rf', './docs'])
100 ExecuteCommand(['rm', '-f', './VERSION']) 100 ExecuteCommand(['rm', '-f', './VERSION'])
101 101
102 102
103 if __name__ == '__main__': 103 if __name__ == '__main__':
104 main() 104 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698