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

Side by Side Diff: tools/bots/editor.py

Issue 18875003: Set public-read acl on editor installers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 months 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 | « no previous file | 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/python 1 #!/usr/bin/python
2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 import os 6 import os
7 import re 7 import re
8 import shutil 8 import shutil
9 import sys 9 import sys
10 import tempfile 10 import tempfile
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 for filename in os.listdir(temp_dir): 77 for filename in os.listdir(temp_dir):
78 match = re.search('^dartium-.*-inc-([0-9]+)\.0$', filename) 78 match = re.search('^dartium-.*-inc-([0-9]+)\.0$', filename)
79 if match: 79 if match:
80 return os.path.join(temp_dir, match.group(0)) 80 return os.path.join(temp_dir, match.group(0))
81 raise Exception("Couldn't find dartium archive") 81 raise Exception("Couldn't find dartium archive")
82 82
83 def UploadInstaller(dart_editor_dmg, directory): 83 def UploadInstaller(dart_editor_dmg, directory):
84 directory = directory % {'revision' : utils.GetSVNRevision()} 84 directory = directory % {'revision' : utils.GetSVNRevision()}
85 uri = '%s/%s' % (GCS_EDITOR_BUCKET, directory) 85 uri = '%s/%s' % (GCS_EDITOR_BUCKET, directory)
86 RunProcess([GSUTIL, 'cp', dart_editor_dmg, uri]) 86 RunProcess([GSUTIL, 'cp', dart_editor_dmg, uri])
87 RunProcess([GSUTIL, 'setacl', 'public-read', uri])
87 88
88 def CreateAndUploadMacInstaller(arch): 89 def CreateAndUploadMacInstaller(arch):
89 dart_icns = os.path.join( 90 dart_icns = os.path.join(
90 'editor', 'tools', 'plugins', 'com.google.dart.tools.deploy', 91 'editor', 'tools', 'plugins', 'com.google.dart.tools.deploy',
91 'icons', 'dart.icns') 92 'icons', 'dart.icns')
92 mac_build_bundle_py = os.path.join('tools', 'mac_build_editor_bundle.sh') 93 mac_build_bundle_py = os.path.join('tools', 'mac_build_editor_bundle.sh')
93 mac_build_dmg_py = os.path.join('tools', 'mac_build_editor_dmg.sh') 94 mac_build_dmg_py = os.path.join('tools', 'mac_build_editor_dmg.sh')
94 editor_dir = GetEditorDirectory('Release', arch) 95 editor_dir = GetEditorDirectory('Release', arch)
95 dart_sdk = GetDartSdkDirectory('Release', arch) 96 dart_sdk = GetDartSdkDirectory('Release', arch)
96 with TempDir() as temp_dir: 97 with TempDir() as temp_dir:
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 else: 145 else:
145 print ("We currently don't build installers for sys.platform=%s" 146 print ("We currently don't build installers for sys.platform=%s"
146 % sys.platform) 147 % sys.platform)
147 return 0 148 return 0
148 149
149 if __name__ == '__main__': 150 if __name__ == '__main__':
150 try: 151 try:
151 sys.exit(main()) 152 sys.exit(main())
152 except OSError as e: 153 except OSError as e:
153 sys.exit(e.errno) 154 sys.exit(e.errno)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698