radare2: 4.5.0 -> 4.5.1

This commit is contained in:
Jörg Thalheim 2020-09-04 10:13:12 +02:00
parent f3bf0f173e
commit 4bdcea4634
No known key found for this signature in database
GPG key ID: 003F2096411B5F92
2 changed files with 28 additions and 16 deletions

View file

@ -110,22 +110,22 @@ in {
#<generated>
# DO NOT EDIT! Automatically generated by ./update.py
radare2 = generic {
version_commit = "25005";
gittap = "4.5.0";
gittip = "9d7eda5ec7367d1682e489e92d1be8e37e459296";
rev = "4.5.0";
version = "4.5.0";
sha256 = "1vnvfgg48bccm41pdyjsql6fy1pymmfnip4w2w56b45d7rqcc3v8";
version_commit = "24959";
gittap = "4.5.1";
gittip = "293cf5ae65ba4e28828095dcae212955593ba255";
rev = "4.5.1";
version = "4.5.1";
sha256 = "0qigy1px0jy74c5ig73dc2fqjcy6vcy76i25dx9r3as6zfpkkaxj";
cs_ver = "4.0.2";
cs_sha256 = "0y5g74yjyliciawpn16zhdwya7bd3d7b1cccpcccc2wg8vni1k2w";
};
r2-for-cutter = generic {
version_commit = "25024";
gittap = "4.5.0";
gittip = "9d7eda5ec7367d1682e489e92d1be8e37e459296";
rev = "9d7eda5ec7367d1682e489e92d1be8e37e459296";
version = "2020-07-17";
sha256 = "1vnvfgg48bccm41pdyjsql6fy1pymmfnip4w2w56b45d7rqcc3v8";
version_commit = "24959";
gittap = "4.5.1";
gittip = "293cf5ae65ba4e28828095dcae212955593ba255";
rev = "4.5.1";
version = "4.5.1";
sha256 = "0qigy1px0jy74c5ig73dc2fqjcy6vcy76i25dx9r3as6zfpkkaxj";
cs_ver = "4.0.2";
cs_sha256 = "0y5g74yjyliciawpn16zhdwya7bd3d7b1cccpcccc2wg8vni1k2w";
};

View file

@ -5,6 +5,8 @@
# and is formatted with black.
import fileinput
import json
import xml.etree.ElementTree as ET
from urllib.parse import urlparse
import re
import subprocess
import tempfile
@ -30,10 +32,20 @@ def prefetch_github(owner: str, repo: str, ref: str) -> str:
def get_radare2_rev() -> str:
url = "https://api.github.com/repos/radare/radare2/releases/latest"
with urllib.request.urlopen(url) as response:
release = json.load(response) # type: ignore
return release["tag_name"]
feed_url = "http://github.com/radareorg/radare2/releases.atom"
with urllib.request.urlopen(feed_url) as resp:
tree = ET.fromstring(resp.read())
releases = tree.findall(".//{http://www.w3.org/2005/Atom}entry")
for release in releases:
link = release.find("{http://www.w3.org/2005/Atom}link")
assert link is not None
url = urlparse(link.attrib["href"])
tag = url.path.split("/")[-1]
if re.match(r"[0-9.]+", tag):
return tag
else:
print(f"ignore {tag}")
raise RuntimeError(f"No release found at {feed_url}")
def get_cutter_version() -> str: