This repository has been archived on 2023-05-06. You can view files and clone it, but cannot push or open issues or pull requests.
helix/magefile.go
2021-09-05 16:18:29 +01:00

35 lines
450 B
Go

//+build mage
package main
import (
"os"
"github.com/magefile/mage/sh"
)
var Default = Build
var binary = "helix"
func Clean() error {
var err error
if err = sh.Run("go", "clean", "./..."); err != nil {
return err
}
if err = os.Remove(binary); err != nil {
return err
}
return nil
}
func Test() error {
return sh.Run("go", "test", ".")
}
func Build() error {
return sh.Run("go", "build", "-o", binary, "cmd/helix/main.go")
}