Skip to content

Commit d470927

Browse files
committed
changes handling of collecting submodules for the ESP32
1 parent e394237 commit d470927

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

builder/esp32.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -870,19 +870,7 @@ def submodules():
870870
if result != 0:
871871
sys.exit(result)
872872

873-
if 'GITHUB_RUN_ID' in os.environ:
874-
cmds = [
875-
[f'export "IDF_PATH={os.path.abspath(idf_path)}"'],
876-
['cd', os.path.abspath(idf_path)],
877-
['. ./export.sh'],
878-
[f'cd {SCRIPT_DIR}']
879-
]
880-
else:
881-
cmds = [
882-
[f'cd {os.path.abspath(idf_path)}'],
883-
[f'. ./export.sh'],
884-
[f'cd {SCRIPT_DIR}']
885-
]
873+
cmds = []
886874

887875
for name, file in (
888876
('berkeley-db-1.xx', 'README'),
@@ -899,6 +887,13 @@ def submodules():
899887
cmds.insert(0, ['cd lib/micropython'])
900888
cmds.append(['cd ../..'])
901889

890+
cmds.insert(0, [f'cd {SCRIPT_DIR}'])
891+
cmds.insert(0, ['. ./export.sh'])
892+
cmds.insert(0, ['cd', os.path.abspath(idf_path)])
893+
894+
if 'GITHUB_RUN_ID' in os.environ:
895+
cmds.insert(0, [f'export "IDF_PATH={os.path.abspath(idf_path)}"'])
896+
902897
cmds.extend(submodules_cmd[:])
903898

904899
return_code, _ = spawn(cmds, env=env)

0 commit comments

Comments
 (0)