generated from templates/go-generic
build(mage): update Build target
This commit is contained in:
parent
a0e3ee8a6f
commit
20d5a64d2a
1 changed files with 5 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue