Skip to content

Commit adf5b8d

Browse files
committed
checkout: print treeid and checkout nodeid by default
Print treeid and checkout nodeid by default to help scripts calling kci-dev parse the checkout response. This allows retrieving the build nodeid for a given checkout nodeid. Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
1 parent a0d7fcf commit adf5b8d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

kcidev/subcommands/checkout.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ def checkout(
147147
if resp and "message" in resp:
148148
click.secho(resp["message"], fg="green")
149149

150+
if resp and "node" in resp:
151+
node = resp.get("node")
152+
treeid = node.get("treeid")
153+
checkout_nodeid = node.get("id")
154+
155+
if treeid:
156+
click.secho(f"treeid: {treeid}", fg="green")
157+
if checkout_nodeid:
158+
click.secho(f"checkout_nodeid: {checkout_nodeid}", fg="green")
159+
150160
if watch and isinstance(resp, dict):
151161
node = resp.get("node")
152162
treeid = node.get("treeid")

0 commit comments

Comments
 (0)