diff --git a/magefiles/mage.go b/magefiles/mage.go index 0097afd..21f22f6 100644 --- a/magefiles/mage.go +++ b/magefiles/mage.go @@ -39,7 +39,11 @@ func Lint() error { // Build build the executable. func Build() error { - return sh.Run("go", "build", "-o", binary, ".") + os.Setenv("GOOS", "linux") + os.Setenv("GOARCH", "amd64") + os.Setenv("CGO_ENABLED", "0") + + return sh.Run("go", "build", "-ldflags=-s -w", "-a", "-o", binary, ".") } // Clean clean the workspace.