diff options
| author | Alberto97 <albertop2197@gmail.com> | 2018-05-05 22:01:02 +0200 |
|---|---|---|
| committer | George Zacharia <george.zcharia@gmail.com> | 2022-07-21 22:27:18 +0530 |
| commit | a57b451b814f779cc5726f5af8b906396ffbd6fe (patch) | |
| tree | 7a227e47f9d594bf02031833db1f0dac724a05dd | |
| parent | 940d3087fc1a28f26aa7dcd3be74f9ae6f66ea9c (diff) | |
Add deviceclean for minimal cleanings12.1
[msfjarvis: Simplify]
Change-Id: I4e56531a039c4f6da3fd596dac02743b9d1f1932
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
| -rw-r--r-- | ui/build/build.go | 4 | ||||
| -rw-r--r-- | ui/build/cleanbuild.go | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/ui/build/build.go b/ui/build/build.go index 8f050d9be..052b40012 100644 --- a/ui/build/build.go +++ b/ui/build/build.go @@ -265,6 +265,10 @@ func Build(ctx Context, config Config) { dataClean(ctx, config) ctx.Println("Deleted data files.") return + } else if inList("deviceclean", config.Arguments()) { + deviceClean(ctx, config, what) + ctx.Println("Performed minimal product cleaning.") + return } if what&RunSoong != 0 { diff --git a/ui/build/cleanbuild.go b/ui/build/cleanbuild.go index bbec78d2e..4856c1982 100644 --- a/ui/build/cleanbuild.go +++ b/ui/build/cleanbuild.go @@ -59,6 +59,13 @@ func dataClean(ctx Context, config Config) { ctx.Println("Entire data directory removed.") } +// Remove everything relevant for a clean ota package +func deviceClean(ctx Context, config Config, what int) { + productOutPath := config.ProductOut() + removeGlobs(ctx, productOutPath) + ctx.Println(productOutPath, "removed.") +} + // installClean deletes all of the installed files -- the intent is to remove // files that may no longer be installed, either because the user previously // installed them, or they were previously installed by default but no longer |
