Skip to content

Commit 6a16048

Browse files
committed
Change sdk folder structure and fix json generation
1 parent 8b4c2c9 commit 6a16048

File tree

2 files changed

+19
-25
lines changed

2 files changed

+19
-25
lines changed

Diff for: tools/add_sdk_json.py

+18-24
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
if sys.version_info[0] == 3:
1919
unicode = lambda s: str(s)
2020

21+
def add_system(systems, host, url, filename, sha, size):
22+
system = {
23+
"host": host,
24+
"url": url,
25+
"archiveFileName": filename,
26+
"checksum": "SHA-256:"+sha,
27+
"size": str(size)
28+
}
29+
systems.append(system)
30+
2131
if __name__ == '__main__':
2232
parser = argparse.ArgumentParser(
2333
prog = 'add_sdk_json',
@@ -76,30 +86,14 @@
7686
farray['packages'][0]['platforms'][0]['toolsDependencies'].append(deps)
7787

7888
systems = []
79-
system = {
80-
"host": '',
81-
"url": tool_url,
82-
"archiveFileName": tool_filename,
83-
"checksum": "SHA-256:"+tool_sha,
84-
"size": str(tool_size)
85-
}
86-
87-
system["host"] = "i686-mingw32";
88-
systems.append(system)
89-
system["host"] = "x86_64-mingw32";
90-
systems.append(system)
91-
system["host"] = "arm64-apple-darwin";
92-
systems.append(system)
93-
system["host"] = "x86_64-apple-darwin";
94-
systems.append(system)
95-
system["host"] = "x86_64-pc-linux-gnu";
96-
systems.append(system)
97-
system["host"] = "i686-pc-linux-gnu";
98-
systems.append(system)
99-
system["host"] = "aarch64-linux-gnu";
100-
systems.append(system)
101-
system["host"] = "arm-linux-gnueabihf";
102-
systems.append(system)
89+
add_system(systems, "i686-mingw32", tool_url, tool_filename, tool_sha, tool_size)
90+
add_system(systems, "x86_64-mingw32", tool_url, tool_filename, tool_sha, tool_size)
91+
add_system(systems, "arm64-apple-darwin", tool_url, tool_filename, tool_sha, tool_size)
92+
add_system(systems, "x86_64-apple-darwin", tool_url, tool_filename, tool_sha, tool_size)
93+
add_system(systems, "x86_64-pc-linux-gnu", tool_url, tool_filename, tool_sha, tool_size)
94+
add_system(systems, "i686-pc-linux-gnu", tool_url, tool_filename, tool_sha, tool_size)
95+
add_system(systems, "aarch64-linux-gnu", tool_url, tool_filename, tool_sha, tool_size)
96+
add_system(systems, "arm-linux-gnueabihf", tool_url, tool_filename, tool_sha, tool_size)
10397

10498
tool_found = False
10599
for t in farray['packages'][0]['tools']:

Diff for: tools/push-to-arduino.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ if [ $LIBS_HAS_COMMIT == "0" ]; then
9292

9393
# make changes to the files
9494
echo "Patching files in esp32-arduino-libs branch '$AR_NEW_BRANCH_NAME'..."
95-
rm -rf $IDF_LIBS_DIR/sdk && cp -Rf $AR_TOOLS/sdk $IDF_LIBS_DIR/
95+
rm -rf $IDF_LIBS_DIR/* && cp -Rf $AR_TOOLS/sdk/* $IDF_LIBS_DIR/
9696

9797
cd $IDF_LIBS_DIR
9898
if [ -f "README.md" ]; then

0 commit comments

Comments
 (0)