summaryrefslogtreecommitdiff
path: root/src/buildstream/_frontend/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream/_frontend/cli.py')
-rw-r--r--src/buildstream/_frontend/cli.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py
index 5b2e60d49..d02dd4258 100644
--- a/src/buildstream/_frontend/cli.py
+++ b/src/buildstream/_frontend/cli.py
@@ -1004,6 +1004,23 @@ def artifact():
# they are not somehow escaped.
+#############################################################
+# Artifact show Command #
+#############################################################
+@artifact.command(name='show', short_help="Show the cached state of artifacts")
+@click.option('--deps', '-d', default='none',
+ type=click.Choice(['build', 'run', 'all', 'none']),
+ help='The dependencies we also want to show (default: none)')
+@click.argument('artifacts', type=click.Path(), nargs=-1)
+@click.pass_obj
+def artifact_show(app, deps, artifacts):
+ """show the cached state of artifacts"""
+ with app.initialized():
+ targets = app.stream.artifact_show(artifacts, selection=deps)
+ click.echo(app.logger.show_state_of_artifacts(targets))
+ sys.exit(0)
+
+
#####################################################################
# Artifact Checkout Command #
#####################################################################