diff options
author | James Ennis <james.ennis@codethink.co.uk> | 2019-08-16 15:47:22 +0100 |
---|---|---|
committer | James Ennis <james.ennis@codethink.co.uk> | 2019-08-27 12:12:13 +0100 |
commit | 4bf7cbd0566b547d29d1acab41f1ea6404253d47 (patch) | |
tree | d0e306b47be2b25c01b1aa2f5ebbb47f0fdefecb /src/buildstream/_frontend/cli.py | |
parent | a94218bb5d37533551bcf24623d951b5a4463bf7 (diff) | |
download | buildstream-4bf7cbd0566b547d29d1acab41f1ea6404253d47.tar.gz |
cli.py: Implement --deps for artifact delete
Diffstat (limited to 'src/buildstream/_frontend/cli.py')
-rw-r--r-- | src/buildstream/_frontend/cli.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py index 1fcf85953..5b2e60d49 100644 --- a/src/buildstream/_frontend/cli.py +++ b/src/buildstream/_frontend/cli.py @@ -1233,12 +1233,15 @@ def artifact_list_contents(app, artifacts): # Artifact Delete Command # ################################################################### @artifact.command(name='delete', short_help="Remove artifacts from the local cache") +@click.option('--deps', '-d', default='none', + type=click.Choice(['none', 'run', 'build', 'all']), + help="The dependencies to delete (default: none)") @click.argument('artifacts', type=click.Path(), nargs=-1) @click.pass_obj -def artifact_delete(app, artifacts): +def artifact_delete(app, artifacts, deps): """Remove artifacts from the local cache""" with app.initialized(): - app.stream.artifact_delete(artifacts) + app.stream.artifact_delete(artifacts, selection=deps) ################################################################## |