diff options
| -rw-r--r-- | magefile.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/magefile.go b/magefile.go index c7ead27..ac5fa87 100644 --- a/magefile.go +++ b/magefile.go @@ -4,6 +4,10 @@ package main import ( + "fmt" + "os" + + "github.com/magefile/mage/mg" "github.com/magefile/mage/sh" ) @@ -11,6 +15,19 @@ import ( // If not set, running mage will list available targets var Default = Test +// Clean +func Clean() error { + fmt.Println("Cleaning...") + return os.RemoveAll("stanuki") +} + +// Build the CLI +func Build() error { + mg.Deps(Clean) + fmt.Println("Building...") + return sh.RunV("go", "build", "-o", "stanuki", "./cmd/stanuki/main.go") +} + // Run the unit tests func Test() error { return sh.RunV("go", "test", "-v", "./...") |
