add --clean flag to charm build #33

Closed
chuckbutler opened this Issue Oct 28, 2015 · 3 comments

Comments

Projects
None yet
3 participants
Contributor

chuckbutler commented Oct 28, 2015

When heavily developing a charm, there are cases where I'm shuffling interfaces/layers between the dependent layer.yaml(s) - and as charm-build is a constructive tool, there's no easy way to signal in place "Please remove my prior constructed charm, and rebuild from scratch - i've removed something".

Introducing a --clean flag is indicative that its a destructive process, and as charm-build knows where the file is going, it could reasonably rm -rf the directory prior to doing the build to ensure a clean artifact is constructed.

Member

johnsca commented Dec 1, 2015

I don't think that we should just rm -rf the target directory, as it may be version controlled (until juju publish is available). However, it certainly could detect and remove any files that are no longer signed by the manifest.

Even better would be to have it explicitly track files that were in the previous manifest and remove them if they are not in the new manifest, which seems like it could be reasonably done by default (i.e., without --clean).

Owner

marcoceppi commented Dec 1, 2015

+1

On Tue, Dec 1, 2015 at 12:36 PM Cory Johns notifications@github.com wrote:

I don't think that we should just rm -rf the target directory, as it may
be version controlled (until juju publish is available). However, it
certainly could detect and remove any files that are no longer signed by
the manifest.

Even better would be to have it explicitly track files that were in the
previous manifest and remove them if they are not in the new manifest,
which seems like it could be reasonably done by default (i.e., without
--clean).


Reply to this email directly or view it on GitHub
#33 (comment).

Contributor

chuckbutler commented Dec 1, 2015

I agree with this as well 👍

johnsca added a commit to johnsca/charm-tools that referenced this issue Feb 12, 2016

johnsca added a commit to johnsca/charm-tools that referenced this issue Feb 12, 2016

Fixed #83: Clean up files removed in base layers
Also fixes:

  * Fix #11
  * Fix #19
  * Fix #33
  * Fix #106

@marcoceppi marcoceppi closed this Feb 12, 2016

@marcoceppi marcoceppi added this to the 2.0 milestone Feb 12, 2016

marcoceppi added a commit that referenced this issue Mar 3, 2016

Fixed #83: Clean up files removed in base layers
Also fixes:

  * Fix #11
  * Fix #19
  * Fix #33
  * Fix #106
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment