aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-02-20 11:53:58 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-02-20 11:53:58 -0600
commit4cfb1495ffc7ca0c8f872c768fd3e2154396c9fb (patch)
treee5c73502a9665312984099b7e693a926edac34fe
parent79ca2275877a3091c7b5b339fe2b2de2dbc6adc7 (diff)
parent6c77b34268954cf114fbe18df8e927b5f7146b85 (diff)
downloadcryptography-4cfb1495ffc7ca0c8f872c768fd3e2154396c9fb.tar.gz
cryptography-4cfb1495ffc7ca0c8f872c768fd3e2154396c9fb.tar.bz2
cryptography-4cfb1495ffc7ca0c8f872c768fd3e2154396c9fb.zip
Merge pull request #651 from alex/upload-wheels
Upload windows wheels
-rw-r--r--tasks.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tasks.py b/tasks.py
index 3de6d3c1..8c7dc40a 100644
--- a/tasks.py
+++ b/tasks.py
@@ -49,6 +49,9 @@ def download_artifacts():
response.raise_for_status()
assert not response.json()["building"]
assert response.json()["result"] == "SUCCESS"
+
+ paths = []
+
for run in response.json()["runs"]:
response = requests.get(
run["url"] + "api/json/",
@@ -59,7 +62,7 @@ def download_artifacts():
response.raise_for_status()
for artifact in response.json()["artifacts"]:
response = requests.get(
- "{}artifacts/{}".format(run["url"], artifact["relativePath"])
+ "{0}artifacts/{1}".format(run["url"], artifact["relativePath"])
)
out_path = os.path.join(
os.path.dirname(__file__),
@@ -68,6 +71,8 @@ def download_artifacts():
)
with open(out_path, "wb") as f:
f.write(response.content)
+ paths.append(out_path)
+ return paths
@invoke.task
@@ -91,4 +96,5 @@ def release(version):
)
response.raise_for_status()
wait_for_build_completed()
- download_artifacts()
+ paths = download_artifacts()
+ invoke.run("twine upload {0}".format(" ".join(paths)))