[tor-commits] [gettor/master] Working script to add TBB' to releases
ilv at torproject.org
ilv at torproject.org
Mon Feb 15 20:06:58 UTC 2016
commit fb48a05736b4a84c3f1e4752e63750a2e6b26ec6
Author: Donncha O'Cearbhaill <donncha at donncha.is>
Date: Sat Feb 6 03:33:42 2016 +0100
Working script to add TBB' to releases
---
upload/bundles2github.py | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/upload/bundles2github.py b/upload/bundles2github.py
index 8668c78..1252163 100644
--- a/upload/bundles2github.py
+++ b/upload/bundles2github.py
@@ -142,20 +142,23 @@ if __name__ == '__main__':
# Erase old links if any and create a new empty one
core.create_links_file('GitHub', readable_fp)
- print("Creating releases")
+ print("Creating links file")
for asset in release.assets:
- filename = asset.download_url.split('/')[-1]
- osys, arch, lc = get_bundle_info(asset.download_url)
+ url = ("https://github.com/{user}/{repo}/releases/download/"
+ "v{tag}/{file}".format(
+ user=github_user,
+ repo=github_repo,
+ tag=version,
+ file=asset.name,
+ ))
+ osys, arch, lc = get_bundle_info(asset.name)
sha256 = get_file_sha256(
- os.path.abspath(os.path.join(tb_path, filename))
+ os.path.abspath(os.path.join(tb_path, asset.name))
)
- link = "{}${}${}$".format(
- asset.download_url,
- asset.download_url+".asc",
- sha256,
- )
- print("Adding {}".format(asset.download_url))
+ link = "{}${}${}$".format(url, url + ".asc", sha256)
+
+ print("Adding {}".format(url))
core.add_link('GitHub', osys, lc, link)
print "Github links updated!"
More information about the tor-commits
mailing list