| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2013, 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 glob | 7 import glob |
| 8 import gsutil | 8 import gsutil |
| 9 import imp | 9 import imp |
| 10 import optparse | 10 import optparse |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 def CreateApiDocs(buildLocation): | 1068 def CreateApiDocs(buildLocation): |
| 1069 """Zip up api_docs, upload it, and upload the raw tree of docs""" | 1069 """Zip up api_docs, upload it, and upload the raw tree of docs""" |
| 1070 | 1070 |
| 1071 apidir = join(DART_PATH, | 1071 apidir = join(DART_PATH, |
| 1072 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), | 1072 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), |
| 1073 'api_docs') | 1073 'api_docs') |
| 1074 | 1074 |
| 1075 shutil.rmtree(apidir, ignore_errors = True) | 1075 shutil.rmtree(apidir, ignore_errors = True) |
| 1076 | 1076 |
| 1077 CallBuildScript('release', 'ia32', 'api_docs') | 1077 CallBuildScript('release', 'ia32', 'api_docs') |
| 1078 CallBuildScript('release', 'ia32', 'docgen') |
| 1078 | 1079 |
| 1079 UploadApiDocs(apidir) | 1080 UploadApiDocs(apidir) |
| 1080 | 1081 |
| 1081 api_zip = join(buildLocation, 'dart-api-docs.zip') | 1082 api_zip = join(buildLocation, 'dart-api-docs.zip') |
| 1082 | 1083 |
| 1083 CreateZip(apidir, api_zip) | 1084 CreateZip(apidir, api_zip) |
| 1084 | 1085 |
| 1085 DartArchiveUploadAPIDocs(api_zip) | 1086 DartArchiveUploadAPIDocs(api_zip) |
| 1086 | 1087 |
| 1087 | 1088 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 def FileDelete(f): | 1246 def FileDelete(f): |
| 1246 """delete the given file - do not re-throw any exceptions that occur""" | 1247 """delete the given file - do not re-throw any exceptions that occur""" |
| 1247 if os.path.exists(f): | 1248 if os.path.exists(f): |
| 1248 try: | 1249 try: |
| 1249 os.remove(f) | 1250 os.remove(f) |
| 1250 except OSError: | 1251 except OSError: |
| 1251 print 'error deleting %s' % f | 1252 print 'error deleting %s' % f |
| 1252 | 1253 |
| 1253 if __name__ == '__main__': | 1254 if __name__ == '__main__': |
| 1254 sys.exit(main()) | 1255 sys.exit(main()) |
| OLD | NEW |