Compare commits

...
Author SHA1 Message Date
jobevers 26c077dd79 still flailing - remove uri expansion 2017-02-22 23:14:40 -06:00
jobevers be97368123 still flailing 2017-02-22 23:05:45 -06:00
jobevers a11949608a still flailing 2017-02-22 22:53:35 -06:00
jobevers 26391cb935 flailing, lets try print some stuff 2017-02-22 18:40:39 -06:00
jobevers 4688e92aab flailing, lets try reversing the uploads 2017-02-22 17:00:19 -06:00
jobevers 498534a61e not sure what else to do, so retrying curl 2017-02-22 16:47:30 -06:00
jobevers 01e19a457b Bump version: 0.9.0rc9 → 0.9.0rc10 2017-02-22 16:14:44 -06:00
jobevers 105f234d2c update submodules 2017-02-22 15:49:14 -06:00
jobevers 18cd7608e3 revert accidental unicode testing 2017-02-22 15:49:00 -06:00
jobevers 9e7ca7c9f8 more curl debugging 2017-02-22 15:24:19 -06:00
jobevers 0c77644861 more curl debugging 2017-02-22 15:11:52 -06:00
5 changed files with 35 additions and 13 deletions

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.9.0rc9
current_version = 0.9.0rc10
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+)(?P<candidate>\d+))?
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "LBRY",
"version": "0.9.0rc9",
"version": "0.9.0rc10",
"main": "main.js",
"description": "LBRY is a fully decentralized, open-source protocol facilitating the discovery, access, and (sometimes) purchase of data.",
"author": {
+1 -1
Submodule lbry updated: 40d4fb5641...d3d8426430.
+31 -9
View File
@@ -40,14 +40,14 @@ def main(args=None):
# TODO: maybe this should be an error
return
app = get_app_artifact()
release = get_release(app_repo, current_tag)
upload_asset(release, app, gh_token)
daemon = get_daemon_artifact()
release = get_release(daemon_repo, current_tag)
upload_asset(release, daemon, gh_token)
app = get_app_artifact()
release = get_release(app_repo, current_tag)
upload_asset(release, app, gh_token)
def check_repo_has_tag(repo, target_tag):
tags = repo.get_tags().get_page(0)
@@ -81,29 +81,51 @@ def get_daemon_artifact():
def upload_asset(release, asset_to_upload, token):
count = 0
while count < 10:
try:
return _upload_asset(release, asset_to_upload, token)
except Exception:
count += 1
def _upload_asset(release, asset_to_upload, token):
basename = os.path.basename(asset_to_upload)
if is_asset_already_uploaded(release, basename):
return
upload_uri = uritemplate.expand(
release.upload_url, {'name': basename})
print 'Release upload url:', release.upload_url
upload_uri = uritemplate.expand(release.upload_url)
print upload_uri
print repr(upload_uri)
print asset_to_upload
print repr(asset_to_upload)
print asset_to_upload.strip()
print repr(asset_to_upload.strip())
# using requests.post fails miserably with SSL EPIPE errors. I spent
# half a day trying to debug before deciding to switch to curl.
#
# TODO: actually set the content type
cmd = [
'curl', '-sS', '-X', 'POST', '-u', ':{}'.format(os.environ['GH_TOKEN']),
'curl',
'--data-binary', str('@{}'.format(asset_to_upload)),
'-sS',
'--header', 'Content-Type:application/octet-stream',
'--data-binary', '@{}'.format(asset_to_upload), upload_uri
'-X', 'POST',
'-u', ':{}'.format(os.environ['GH_TOKEN']),
str(upload_uri)
]
print 'Calling curl:'
print cmd
print
p = subprocess.Popen(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
stdout, stderr = p.communicate()
print 'curl return code:', p.returncode
if stderr:
print 'stderr output from curl:'
print stderr
output = json.loads(stdout)
print 'stdout from curl:'
print stdout
output = json.loads(stdout)
if 'errors' in output:
raise Exception(output)
else: