@@ -27,8 +27,8 @@ def replace_if_xz(system):
2727 if not system ['url' ].endswith (".tar.xz" ):
2828 return system
2929
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" )
3232 new_checksum = ""
3333 new_size = 0
3434
@@ -40,8 +40,16 @@ def replace_if_xz(system):
4040 (owner , proj , version , filename ) = urlx [0 ]
4141 release_manifest_url = "https://github.com/%s/%s/releases/download/%s/%s-%s-checksum.sha256" % (owner , proj , version , proj , version )
4242 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
4553
4654 # check if we have already downloaded and parsed that manifest
4755 manifest_index = 0
0 commit comments