| 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.path | 7 import os.path |
| 8 import shutil | 8 import shutil |
| 9 import sys | 9 import sys |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW) | 55 namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW) |
| 56 revision = utils.GetSVNRevision() | 56 revision = utils.GetSVNRevision() |
| 57 for revision in [revision, 'latest']: | 57 for revision in [revision, 'latest']: |
| 58 path32 = namer.sdk_zipfilepath(revision, system, 'ia32', 'release') | 58 path32 = namer.sdk_zipfilepath(revision, system, 'ia32', 'release') |
| 59 path64 = namer.sdk_zipfilepath(revision, system, 'x64', 'release') | 59 path64 = namer.sdk_zipfilepath(revision, system, 'x64', 'release') |
| 60 DartArchiveFile(sdk32_zip, path32, checksum_files=True) | 60 DartArchiveFile(sdk32_zip, path32, checksum_files=True) |
| 61 DartArchiveFile(sdk64_zip, path64, checksum_files=True) | 61 DartArchiveFile(sdk64_zip, path64, checksum_files=True) |
| 62 | 62 |
| 63 def CreateUploadSDK(): | 63 def CreateUploadSDK(): |
| 64 BuildSDK() | 64 BuildSDK() |
| 65 if BUILD_OS == 'linux': | 65 CreateUploadSDKZips() |
| 66 CreateUploadSDKZips() | |
| 67 | 66 |
| 68 def CreateUploadAPIDocs(): | 67 def CreateUploadAPIDocs(): |
| 69 api_path = os.path.join(bot_utils.DART_DIR, | 68 api_path = os.path.join(bot_utils.DART_DIR, |
| 70 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), | 69 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), |
| 71 'api_docs') | 70 'api_docs') |
| 72 api_zip = os.path.join(bot_utils.DART_DIR, | 71 api_zip = os.path.join(bot_utils.DART_DIR, |
| 73 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), | 72 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), |
| 74 'dart-api-docs.zip') | 73 'dart-api-docs.zip') |
| 75 shutil.rmtree(api_path, ignore_errors=True) | 74 shutil.rmtree(api_path, ignore_errors=True) |
| 76 FileDelete(api_zip) | 75 FileDelete(api_zip) |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 local_sha256 = bot_utils.CreateSha256ChecksumFile(local_path, | 166 local_sha256 = bot_utils.CreateSha256ChecksumFile(local_path, |
| 168 mangled_filename) | 167 mangled_filename) |
| 169 gsutil.upload(local_sha256, remote_path + '.sha256sum', public=True) | 168 gsutil.upload(local_sha256, remote_path + '.sha256sum', public=True) |
| 170 | 169 |
| 171 def Run(command): | 170 def Run(command): |
| 172 print "Running %s" % ' '.join(command) | 171 print "Running %s" % ' '.join(command) |
| 173 return bot.RunProcess(command) | 172 return bot.RunProcess(command) |
| 174 | 173 |
| 175 if __name__ == '__main__': | 174 if __name__ == '__main__': |
| 176 CreateUploadSDK() | 175 CreateUploadSDK() |
| 177 CreateUploadAPIDocs() | 176 if BUILD_OS == 'linux': |
| 177 CreateUploadAPIDocs() |
| OLD | NEW |