Use stream-uploading to upload the asset to GitHub.

This commit is contained in:
Cheng Zhao 2013-10-15 09:04:05 +08:00
parent 7fa6407f65
commit 61b2377cf2

View file

@ -135,9 +135,8 @@ def upload_atom_shell(github, release_id, file_path):
params = {'name': os.path.basename(file_path)} params = {'name': os.path.basename(file_path)}
headers = {'Content-Type': 'application/zip'} headers = {'Content-Type': 'application/zip'}
with open(file_path, 'rb') as f: with open(file_path, 'rb') as f:
data = f.read()
github.repos(ATOM_SHELL_REPO).releases(release_id).assets.post( 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): def publish_release(github, release_id):