]> khamidou — GitHub mirrors - electron.git/commitdiff
Use stream-uploading to upload the asset to GitHub.
authorCheng Zhao <zcbenz@gmail.com>
Tue, 15 Oct 2013 01:04:05 +0000 (09:04 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 15 Oct 2013 01:04:05 +0000 (09:04 +0800)
script/upload.py

index 026abb14d75cd7769fb82b14c15070bf5bd850de..ac95a4859a0b7090009f7b28b9b0cb1601d7f877 100755 (executable)
@@ -135,9 +135,8 @@ def upload_atom_shell(github, release_id, file_path):
   params = {'name': os.path.basename(file_path)}
   headers = {'Content-Type': 'application/zip'}
   with open(file_path, 'rb') as f:
-    data = f.read()
     github.repos(ATOM_SHELL_REPO).releases(release_id).assets.post(
-        params=params, headers=headers, data=data, verify=False)
+        params=params, headers=headers, data=f, verify=False)
 
 
 def publish_release(github, release_id):