Skip to content

Commit d1d0657

Browse files
committed
scripts: west_commands: create_board: return list of post-actions
When passed a JSON response to generate a board, return a list of actions or commands that should be performed afterwards. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 5bae20b commit d1d0657

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

scripts/west_commands/create_board/ncs_create_board.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,4 +225,19 @@ def do_run(self, args, unknown_args):
225225
with open(out_dir / f"{name}.yml", "w") as f:
226226
f.write(tmpl.render(target=target))
227227

228-
print(f"Board {input['board']} created successfully")
228+
# return post-commands
229+
commands = []
230+
231+
if series == "nrf54h":
232+
commands.append(
233+
{
234+
"name": "Create BICR",
235+
"command": "west",
236+
"args": ["ncs-bicr", "--board-dir", str(out_dir.resolve())],
237+
"properties": {
238+
"providesJsonSchema": True,
239+
},
240+
}
241+
)
242+
243+
print(json.dumps({"commands": commands}))

0 commit comments

Comments
 (0)