| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, 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 # Dart Editor promote and google storage cleanup tools. | 7 # Dart Editor promote and google storage cleanup tools. |
| 8 | 8 |
| 9 import gsutil | 9 import gsutil |
| 10 import imp | 10 import imp |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 from_namer = raw_namer | 353 from_namer = raw_namer |
| 354 # We have signed versions of the editor for windows and macos. | 354 # We have signed versions of the editor for windows and macos. |
| 355 if system == 'windows' or system == 'macos': | 355 if system == 'windows' or system == 'macos': |
| 356 from_namer = signed_namer | 356 from_namer = signed_namer |
| 357 from_loc = from_namer.editor_zipfilepath(revision, system, arch) | 357 from_loc = from_namer.editor_zipfilepath(revision, system, arch) |
| 358 to_loc = release_namer.editor_zipfilepath(to_revision, system, arch) | 358 to_loc = release_namer.editor_zipfilepath(to_revision, system, arch) |
| 359 _Gsutil(['cp', '-a', 'public-read', from_loc, to_loc]) | 359 _Gsutil(['cp', '-a', 'public-read', from_loc, to_loc]) |
| 360 _Gsutil(['cp', '-a', 'public-read', from_loc + '.md5sum', | 360 _Gsutil(['cp', '-a', 'public-read', from_loc + '.md5sum', |
| 361 to_loc + '.md5sum']) | 361 to_loc + '.md5sum']) |
| 362 | 362 |
| 363 # Copy signed editor installers for macos/windows. |
| 364 for system, extension in [('windows', 'msi'), ('macos', 'dmg')]: |
| 365 for arch in ['ia32', 'x64']: |
| 366 from_loc = signed_namer.editor_installer_filepath( |
| 367 revision, system, arch, extension) |
| 368 to_loc = release_namer.editor_installer_filepath( |
| 369 to_revision, system, arch, extension) |
| 370 _Gsutil(['cp', '-a', 'public-read', from_loc, to_loc]) |
| 371 |
| 363 promote(revision) | 372 promote(revision) |
| 364 promote('latest') | 373 promote('latest') |
| 365 | 374 |
| 366 def _PrintSeparator(text): | 375 def _PrintSeparator(text): |
| 367 print '================================' | 376 print '================================' |
| 368 print '== %s' % text | 377 print '== %s' % text |
| 369 | 378 |
| 370 | 379 |
| 371 def _PrintFailure(text): | 380 def _PrintFailure(text): |
| 372 print '*****************************' | 381 print '*****************************' |
| (...skipping 11 matching lines...) Expand all Loading... |
| 384 if directory is not None: | 393 if directory is not None: |
| 385 cwd = os.getcwd() | 394 cwd = os.getcwd() |
| 386 os.chdir(directory) | 395 os.chdir(directory) |
| 387 subprocess.call(cmd, env=os.environ) | 396 subprocess.call(cmd, env=os.environ) |
| 388 if directory is not None: | 397 if directory is not None: |
| 389 os.chdir(cwd) | 398 os.chdir(cwd) |
| 390 | 399 |
| 391 | 400 |
| 392 if __name__ == '__main__': | 401 if __name__ == '__main__': |
| 393 sys.exit(main()) | 402 sys.exit(main()) |
| OLD | NEW |