Fix package upload (#828)

This commit is contained in:
Victor Zverovich 2018-08-11 07:57:45 -07:00
parent 809073851f
commit 0f04ec68a9

View File

@ -247,7 +247,8 @@ def release(args):
package = 'fmt-{}.zip'.format(version) package = 'fmt-{}.zip'.format(version)
r = requests.post( r = requests.post(
'{}/{}/assets?name={}'.format(uploads_url, id, package), '{}/{}/assets?name={}'.format(uploads_url, id, package),
params=params, files={package: open('build/fmt/' + package, 'rb')}) headers={'Content-Type': 'application/zip'},
params=params, data=open('build/fmt/' + package, 'rb'))
if r.status_code != 201: if r.status_code != 201:
raise Exception('Failed to upload an asset ' + str(r)) raise Exception('Failed to upload an asset ' + str(r))