From 6ab3f46b6f615dda1cef5cf7d0531a1cc9ba2903 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 20 Feb 2014 09:07:53 -0800 Subject: Upload windows wheels --- tasks.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tasks.py') diff --git a/tasks.py b/tasks.py index 3de6d3c1..1021360a 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/", @@ -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))) -- cgit v1.2.3 From 6c77b34268954cf114fbe18df8e927b5f7146b85 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 20 Feb 2014 09:32:55 -0800 Subject: python 2.6 --- tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tasks.py') diff --git a/tasks.py b/tasks.py index 1021360a..8c7dc40a 100644 --- a/tasks.py +++ b/tasks.py @@ -62,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__), -- cgit v1.2.3