Skip to content

Commit 42d69b7

Browse files
committed
fix(ci): stm32cube git submodule management
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent a5135d4 commit 42d69b7

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

CI/update/stm32cube.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,8 @@ def updateSTRepo():
314314
if repo_path.exists():
315315
rname, bname = getRepoBranchName(repo_path)
316316
# Get new tags from the remote
317-
git_cmds = [
318-
["git", "-C", repo_path, "fetch"],
317+
execute_cmd(["git", "-C", repo_path, "fetch"], None)
318+
execute_cmd(
319319
[
320320
"git",
321321
"-C",
@@ -325,10 +325,11 @@ def updateSTRepo():
325325
bname,
326326
f"{rname}/{bname}",
327327
],
328-
]
328+
None,
329+
)
329330
gitmodule_path = repo_path / ".gitmodules"
330331
if gitmodule_path.exists():
331-
git_cmds += (
332+
execute_cmd(
332333
[
333334
"git",
334335
"-C",
@@ -338,14 +339,14 @@ def updateSTRepo():
338339
"--init",
339340
"--recursive",
340341
],
342+
None,
341343
)
342344
else:
343345
# Clone it as it does not exists yet
344-
git_cmds = [
345-
["git", "-C", repo_local_path, "clone", "--recursive", gh_STM32Cube]
346-
]
347-
for cmd in git_cmds:
348-
execute_cmd(cmd, None)
346+
execute_cmd(
347+
["git", "-C", repo_local_path, "clone", "--recursive", gh_STM32Cube],
348+
None,
349+
)
349350
latestTag(serie, repo_name, repo_path)
350351
checkVersion(serie, repo_path)
351352

0 commit comments

Comments
 (0)