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 12 matching lines...) Expand all Loading... |
23 Run([sys.executable, './tools/build.py', '--mode=release', | 23 Run([sys.executable, './tools/build.py', '--mode=release', |
24 '--arch=ia32,x64', 'create_sdk']) | 24 '--arch=ia32,x64', 'create_sdk']) |
25 | 25 |
26 def BuildAPIDocs(): | 26 def BuildAPIDocs(): |
27 with bot.BuildStep('Build API docs'): | 27 with bot.BuildStep('Build API docs'): |
28 Run([sys.executable, './tools/build.py', '--mode=release', | 28 Run([sys.executable, './tools/build.py', '--mode=release', |
29 '--arch=ia32', 'api_docs']) | 29 '--arch=ia32', 'api_docs']) |
30 Run([sys.executable, './tools/build.py', '--mode=release', | 30 Run([sys.executable, './tools/build.py', '--mode=release', |
31 '--arch=ia32', 'dartdocgen']) | 31 '--arch=ia32', 'dartdocgen']) |
32 | 32 |
| 33 def CreateUploadVersionFile(): |
| 34 file_path = os.path.join(bot_utils.DART_DIR, |
| 35 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), |
| 36 'VERSION') |
| 37 with open(file_path, 'w') as fd: |
| 38 fd.write(utils.GetVersionFileContent()) |
| 39 DartArchiveUploadVersionFile(file_path) |
| 40 |
| 41 def DartArchiveUploadVersionFile(version_file): |
| 42 namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW) |
| 43 revision = utils.GetSVNRevision() |
| 44 for revision in [revision, 'latest']: |
| 45 destination = namer.version_filepath(revision) |
| 46 DartArchiveFile(version_file, destination, checksum_files=False) |
| 47 |
33 def CreateUploadSDKZips(): | 48 def CreateUploadSDKZips(): |
34 with bot.BuildStep('Create and upload sdk zips'): | 49 with bot.BuildStep('Create and upload sdk zips'): |
35 sdk32_path = os.path.join(bot_utils.DART_DIR, | 50 sdk32_path = os.path.join(bot_utils.DART_DIR, |
36 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), | 51 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'), |
37 'dart-sdk') | 52 'dart-sdk') |
38 sdk64_path = os.path.join(bot_utils.DART_DIR, | 53 sdk64_path = os.path.join(bot_utils.DART_DIR, |
39 utils.GetBuildRoot(BUILD_OS, 'release', 'x64'), | 54 utils.GetBuildRoot(BUILD_OS, 'release', 'x64'), |
40 'dart-sdk') | 55 'dart-sdk') |
41 | 56 |
42 sdk32_zip = os.path.join(bot_utils.DART_DIR, | 57 sdk32_zip = os.path.join(bot_utils.DART_DIR, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 mangled_filename) | 182 mangled_filename) |
168 gsutil.upload(local_sha256, remote_path + '.sha256sum', public=True) | 183 gsutil.upload(local_sha256, remote_path + '.sha256sum', public=True) |
169 | 184 |
170 def Run(command): | 185 def Run(command): |
171 print "Running %s" % ' '.join(command) | 186 print "Running %s" % ' '.join(command) |
172 return bot.RunProcess(command) | 187 return bot.RunProcess(command) |
173 | 188 |
174 if __name__ == '__main__': | 189 if __name__ == '__main__': |
175 CreateUploadSDK() | 190 CreateUploadSDK() |
176 if BUILD_OS == 'linux': | 191 if BUILD_OS == 'linux': |
| 192 CreateUploadVersionFile() |
177 CreateUploadAPIDocs() | 193 CreateUploadAPIDocs() |
OLD | NEW |