mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
mage: Add uninstall target
This commit is contained in:
parent
e5591e89d3
commit
21dbfa1f11
1 changed files with 5 additions and 0 deletions
|
@ -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{
|
||||
|
|
Loading…
Reference in a new issue