Commit 438702b
Changed files (1)
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", "./...")