refactor: use only a single implementation for cache purging

This change moves cache clearing into the repo plugin, and standardizes on a single way of clearing the cache.
This commit is contained in:
Jose Diaz-Gonzalez
2019-07-05 16:12:22 -04:00
parent 33423a0508
commit 69e4cd7c44
5 changed files with 71 additions and 46 deletions

View File

@@ -0,0 +1,19 @@
package main
import (
"flag"
"github.com/dokku/dokku/plugins/common"
"github.com/dokku/dokku/plugins/repo"
)
// destroys the buildpacks property for a given app container
func main() {
flag.Parse()
appName := flag.Arg(0)
err := repo.PurgeCache(appName)
if err != nil {
common.LogFail(err.Error())
}
}