Skip to content

Commit

Permalink
Specify Builder flags
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Sep 20, 2022
1 parent c8fc2a7 commit 0e9fd2a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
alfred-chromium-workflow
alfred-chromium-workflow*
cache
_*

Expand Down
9 changes: 8 additions & 1 deletion magefile.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build mage
// +build mage

package main
Expand Down Expand Up @@ -46,4 +47,10 @@ func Clean() error { return sh.Run("mage", "-clean") }

func Formatter() error { return sh.Run("gofmt", "-w", "src", "main.go") }

func Builder() error { return sh.Run("go", "build", ".") }
func Builder() error {
return sh.RunWith(map[string]string{
"GOOS": "darwin",
"GOARCH": "amd64",
"CGO_ENABLED": "1",
}, "go", "build", "-o", "alfred-chromium-workflow", ".")
}

0 comments on commit 0e9fd2a

Please sign in to comment.