-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: Add --destructive-mode to clean #2577
Conversation
Excellent! I was just looking for an option like this yesterday :) Tested, LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
running static tests, I caught a formatting issue:
--- snapcraft/cli/lifecycle.py 2019-05-29 13:21:04.512712 +0000
+++ snapcraft/cli/lifecycle.py 2019-05-29 13:37:20.879088 +0000
@@ -305,11 +305,11 @@
)
@click.option(
"--destructive-mode",
is_flag=True,
required=False,
- help="Forces snapcraft to try and use the current host to build."
+ help="Forces snapcraft to try and use the current host to build.",
)
@click.option("--unprime", is_flag=True, required=False, cls=HiddenOption)
def clean(parts, use_lxd, destructive_mode, unprime):
"""Remove a part's assets.
@@ -317,11 +317,12 @@
Examples:
snapcraft clean
snapcraft clean my-part
"""
build_environment = get_build_environment(
- use_lxd=use_lxd, destructive_mode=destructive_mode)
+ use_lxd=use_lxd, destructive_mode=destructive_mode
+ )
project = get_project(is_managed_host=build_environment.is_managed_host)
if unprime and not build_environment.is_managed_host:
raise click.BadOptionUsage("--unprime is not a valid option.")
07a70c9
to
aa2aa06
Compare
aa2aa06
to
0500865
Compare
Codecov Report
@@ Coverage Diff @@
## master #2577 +/- ##
==========================================
+ Coverage 89.03% 89.06% +0.02%
==========================================
Files 205 205
Lines 13986 13987 +1
Branches 2118 2118
==========================================
+ Hits 12453 12458 +5
+ Misses 1082 1080 -2
+ Partials 451 449 -2
Continue to review full report at Codecov.
|
138088c
to
3229b60
Compare
Allow wrapper scripts to pass --destructive-mode to lifecycle commands
3229b60
to
98f70e5
Compare
Allow wrapper scripts to pass --destructive-mode to lifecycle commands
Allow wrapper scripts to pass --destructive-mode to lifecycle commands
Fixes https://bugs.launchpad.net/snapcraft/+bug/1827191
./runtests.sh static
?./runtests.sh tests/unit
?