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

Side by Side Diff: dart/tools/signing_script.py

Issue 54543007: promote.py: Archive installers to new gs://dart-archive bucket when promoting (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « dart/tools/bots/bot_utils.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 hashlib
8 import imp 7 import imp
9 import optparse 8 import optparse
10 import os 9 import os
11 import subprocess 10 import subprocess
12 import sys 11 import sys
13 12
14 DART_DIR = os.path.dirname(os.path.dirname(__file__)) 13 DART_DIR = os.path.dirname(os.path.dirname(__file__))
15 GSUTIL = os.path.join(DART_DIR, 'third_party', 'gsutil', 'gsutil') 14 GSUTIL = os.path.join(DART_DIR, 'third_party', 'gsutil', 'gsutil')
16 BOT_UTILS = os.path.join(DART_DIR, 'tools', 'bots', 'bot_utils.py') 15 BOT_UTILS = os.path.join(DART_DIR, 'tools', 'bots', 'bot_utils.py')
17 BASENAME_PATTERN = 'darteditor-%(system)s-%(bits)s' 16 BASENAME_PATTERN = 'darteditor-%(system)s-%(bits)s'
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 presign_dir, locations[system]['%s_scratch' % name] % config) 250 presign_dir, locations[system]['%s_scratch' % name] % config)
252 251
253 if locations[system]['zip']: 252 if locations[system]['zip']:
254 # We copy a .app directory directory and zip it 253 # We copy a .app directory directory and zip it
255 copy_and_zip(from_path, to_path) 254 copy_and_zip(from_path, to_path)
256 else: 255 else:
257 # We copy an .exe file 256 # We copy an .exe file
258 copy_file(from_path, to_path) 257 copy_file(from_path, to_path)
259 elif options.deploy: 258 elif options.deploy:
260 copy_tree(destination_dir, deploy_dir) 259 copy_tree(destination_dir, deploy_dir)
261 260
262 for name in ['editor', 'chrome', 'content_shell']: 261 for name in ['editor', 'chrome', 'content_shell']:
263 from_path = os.path.join( 262 from_path = os.path.join(
264 postsign_dir, locations[system]['%s_scratch' % name] % config) 263 postsign_dir, locations[system]['%s_scratch' % name] % config)
265 to_path = os.path.join(deploy_dir, locations[system][name]) 264 to_path = os.path.join(deploy_dir, locations[system][name])
266 265
267 if locations[system]['zip']: 266 if locations[system]['zip']:
268 # We unzip a zip file and copy the resulting signed .app directory 267 # We unzip a zip file and copy the resulting signed .app directory
269 unzip_and_copy(from_path, to_path) 268 unzip_and_copy(from_path, to_path)
270 else: 269 else:
271 # We copy the signed .exe file 270 # We copy the signed .exe file
272 copy_file(from_path, to_path) 271 copy_file(from_path, to_path)
273 272
274 deploy_zip_file = os.path.abspath(deploy) 273 deploy_zip_file = os.path.abspath(deploy)
275 with ChangedWorkingDirectory(deploy_dir): 274 with ChangedWorkingDirectory(deploy_dir):
276 run(['zip', '-r9', deploy_zip_file, 'dart']) 275 run(['zip', '-r9', deploy_zip_file, 'dart'])
277 276
278 # Upload *.zip/*.zip.md5sum and set 'public-read' ACL 277 # Upload *.zip/*.zip.md5sum and set 'public-read' ACL
279 if options.channel: 278 if options.channel:
280 upload_to_new_location(options.channel, config, deploy_zip_file) 279 upload_to_new_location(options.channel, config, deploy_zip_file)
281 else: 280 else:
282 upload_to_old_location(config, deploy_zip_file) 281 upload_to_old_location(config, deploy_zip_file)
283 282
284 if __name__ == '__main__': 283 if __name__ == '__main__':
285 main() 284 main()
286 285
OLDNEW
« no previous file with comments | « dart/tools/bots/bot_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698