]> khamidou — GitHub mirrors - electron.git/commitdiff
Don't require multipart for uploading to S3.
authorCheng Zhao <zcbenz@gmail.com>
Sat, 31 Aug 2013 02:36:13 +0000 (10:36 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sat, 31 Aug 2013 02:36:13 +0000 (10:36 +0800)
The file we are uploading is not large, and multipart works really bad
on bad networking.

script/upload.py

index 7595b045eec9bf153215371c0d58eeb8d25bed33..4d1fb6e0bce942751f599f6ad8f856044a04f083 100755 (executable)
@@ -24,24 +24,10 @@ DIST_NAME = 'atom-shell-{0}-{1}.zip'.format(get_atom_shell_version(),
 
 
 def main():
-  try:
-    ensure_s3put()
-    if not dist_newer_than_head():
-      create_dist = os.path.join(SOURCE_ROOT, 'script', 'create-dist.py')
-      subprocess.check_call([sys.executable, create_dist])
-    upload()
-  except AssertionError as e:
-    return e.message
-
-
-def ensure_s3put():
-  output = ''
-  try:
-    output = subprocess.check_output(['s3put', '--help'])
-  except OSError as e:
-    if e.errno != errno.ENOENT:
-      raise
-  assert 'multipart' in output, 'Error: Please install boto and filechunkio'
+  if not dist_newer_than_head():
+    create_dist = os.path.join(SOURCE_ROOT, 'script', 'create-dist.py')
+    subprocess.check_call([sys.executable, create_dist])
+  upload()
 
 
 def dist_newer_than_head():