clean: Simplify approach to cleaning
Each component has 2 directories which matter; source and build. We
delete the build directory and `git clean --xdff` any repos within the
source directory. Previously, we were trying to be too clever with `git
reset`. But now that `shrinkwrap build` ensures the repos are synced,
there is no need for this in clean.
So let's simplify; get rid of --deep and always do the `git clean`.
Since we are always doing this, there is no need for a component to be
able to specify custom clean commands - they are just adding latency
when cleaning.
There is one corner case, which I'm choosing to ignore. If a component
doesn't have any repos defined, but does have a custom sourcedir, there
is no way to clean that custom source dir. But this is not really a
valid approach. All components should have a repo if they have sources.
And users should only be overriding sourcedir to point to a local git
repo. And everything works in that case.
Signed-off-by:
Ryan Roberts <ryan.roberts@arm.com>
Loading
Please register or sign in to comment