mage: Add uninstall target

This commit is contained in:
Ricardo N Feliciano 2020-07-24 12:52:31 -04:00 committed by Bjørn Erik Pedersen
parent e5591e89d3
commit 21dbfa1f11

View file

@ -57,6 +57,11 @@ func Install() error {
return sh.RunWith(flagEnv(), goexe, "install", "-ldflags", ldflags, "-tags", buildTags(), packageName)
}
// Uninstall hugo binary
func Uninstall() error {
return sh.Run(goexe, "clean", "-i", packageName)
}
func flagEnv() map[string]string {
hash, _ := sh.Output("git", "rev-parse", "--short", "HEAD")
return map[string]string{