@@ -27,8 +27,8 @@ def replace_if_xz(system):
27
27
if not system ['url' ].endswith (".tar.xz" ):
28
28
return system
29
29
30
- new_url = system ['url' ].replace (".tar.xz" , ".tar.gz" )
31
- new_name = system ['archiveFileName' ].replace (".tar.xz" , ".tar.gz" )
30
+ new_url = system ['url' ].replace (".tar.xz" , "_signed .tar.gz" )
31
+ new_name = system ['archiveFileName' ].replace (".tar.xz" , "_signed .tar.gz" )
32
32
new_checksum = ""
33
33
new_size = 0
34
34
@@ -40,8 +40,16 @@ def replace_if_xz(system):
40
40
(owner , proj , version , filename ) = urlx [0 ]
41
41
release_manifest_url = "https://github.com/%s/%s/releases/download/%s/%s-%s-checksum.sha256" % (owner , proj , version , proj , version )
42
42
else :
43
- print ("No manifest match" )
44
- return system
43
+ new_url = system ['url' ].replace (".tar.xz" , ".tar.gz" )
44
+ new_name = system ['archiveFileName' ].replace (".tar.xz" , ".tar.gz" )
45
+ # parse the download url to extract all info needed for the checksum file url
46
+ urlx = re .findall ("^https://github.com/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/releases/download/([a-zA-Z0-9_\-.]+)/([a-zA-Z0-9_\-.]+)$" , new_url )
47
+ if urlx and len (urlx ) > 0 :
48
+ (owner , proj , version , filename ) = urlx [0 ]
49
+ release_manifest_url = "https://github.com/%s/%s/releases/download/%s/%s-%s-checksum.sha256" % (owner , proj , version , proj , version )
50
+ else :
51
+ print ("No manifest match" )
52
+ return system
45
53
46
54
# check if we have already downloaded and parsed that manifest
47
55
manifest_index = 0
0 commit comments