Skip to content

Commit 3305cbe

Browse files
committed
Add temporarily the option to use toolchains with _signed postfix
This is to fix an issue with ARM Mac toolchain for IDF v5.4
1 parent 43bf922 commit 3305cbe

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Diff for: tools/gen_tools_json.py

+12-4
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)