| 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 imp | 7 import imp |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import subprocess | 10 import subprocess |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 run([GSUTIL, 'cp', bucket, destination]) | 125 run([GSUTIL, 'cp', bucket, destination]) |
| 126 | 126 |
| 127 def upload_to_new_location(channel, config, source_zip): | 127 def upload_to_new_location(channel, config, source_zip): |
| 128 namer = bot_utils.GCSNamer(channel, | 128 namer = bot_utils.GCSNamer(channel, |
| 129 bot_utils.ReleaseType.SIGNED) | 129 bot_utils.ReleaseType.SIGNED) |
| 130 zipfilename = namer.editor_zipfilename(config['system'], config['bits']) | 130 zipfilename = namer.editor_zipfilename(config['system'], config['bits']) |
| 131 bucket = namer.editor_zipfilepath(config['revision'], config['system'], | 131 bucket = namer.editor_zipfilepath(config['revision'], config['system'], |
| 132 config['bits']) | 132 config['bits']) |
| 133 | 133 |
| 134 if not DRY_RUN: | 134 if not DRY_RUN: |
| 135 bot_utils.CreateChecksumFile(source_zip, mangled_filename=zipfilename) | 135 bot_utils.CreateMD5ChecksumFile(source_zip, mangled_filename=zipfilename) |
| 136 bot_utils.CreateSha256ChecksumFile(source_zip, |
| 137 mangled_filename=zipfilename) |
| 136 md5_zip_file = source_zip + '.md5sum' | 138 md5_zip_file = source_zip + '.md5sum' |
| 139 sha256_zip_file = source_zip + '.sha256sum' |
| 137 | 140 |
| 138 run([GSUTIL, 'cp', source_zip, bucket]) | 141 run([GSUTIL, 'cp', source_zip, bucket]) |
| 139 run([GSUTIL, 'cp', md5_zip_file, bucket + '.md5sum']) | 142 run([GSUTIL, 'cp', md5_zip_file, bucket + '.md5sum']) |
| 143 run([GSUTIL, 'cp', sha256_zip_file, bucket + '.sha256sum']) |
| 140 run([GSUTIL, 'setacl', 'public-read', bucket]) | 144 run([GSUTIL, 'setacl', 'public-read', bucket]) |
| 141 run([GSUTIL, 'setacl', 'public-read', bucket + '.md5sum']) | 145 run([GSUTIL, 'setacl', 'public-read', bucket + '.md5sum']) |
| 146 run([GSUTIL, 'setacl', 'public-read', bucket + '.sha256sum']) |
| 142 | 147 |
| 143 def upload_msi_installer_to_new_location(channel, config, signed_msi): | 148 def upload_msi_installer_to_new_location(channel, config, signed_msi): |
| 144 namer = bot_utils.GCSNamer(channel, bot_utils.ReleaseType.SIGNED) | 149 namer = bot_utils.GCSNamer(channel, bot_utils.ReleaseType.SIGNED) |
| 145 bucket = namer.editor_installer_filepath( | 150 bucket = namer.editor_installer_filepath( |
| 146 config['revision'], config['system'], config['bits'], 'msi') | 151 config['revision'], config['system'], config['bits'], 'msi') |
| 147 run([GSUTIL, 'cp', '-a', 'public-read', signed_msi, bucket]) | 152 run([GSUTIL, 'cp', '-a', 'public-read', signed_msi, bucket]) |
| 148 | 153 |
| 149 def main(): | 154 def main(): |
| 150 if sys.platform != 'linux2': | 155 if sys.platform != 'linux2': |
| 151 print "This script was only tested on linux. Please run it on linux!" | 156 print "This script was only tested on linux. Please run it on linux!" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 277 |
| 273 # Upload *.msi installer and set 'public-read ACL | 278 # Upload *.msi installer and set 'public-read ACL |
| 274 if system == 'win32': | 279 if system == 'win32': |
| 275 postsign_msi = os.path.join( | 280 postsign_msi = os.path.join( |
| 276 postsign_dir, locations[system]['msi_scratch'] % config) | 281 postsign_dir, locations[system]['msi_scratch'] % config) |
| 277 upload_msi_installer_to_new_location( | 282 upload_msi_installer_to_new_location( |
| 278 options.channel, config, postsign_msi) | 283 options.channel, config, postsign_msi) |
| 279 | 284 |
| 280 if __name__ == '__main__': | 285 if __name__ == '__main__': |
| 281 main() | 286 main() |
| 282 | |
| OLD | NEW |