Skip to content

Commit

Permalink
Merge pull request #23 from sgettys/add_multiarch_to_xbuild
Browse files Browse the repository at this point in the history
Added multi arch support to xbuildall
  • Loading branch information
sgettys authored Feb 22, 2023
2 parents eca2867 + c4fa517 commit 7451d19
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions releases/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import (
)

var (
runtimeArch = "amd64"
runtimePlatform = "linux"
supportedClientGOOS = []string{"linux", "darwin", "windows"}
runtimeArch = "amd64"
runtimePlatform = "linux"
supportedClientGOOS = []string{"linux", "darwin", "windows"}
supportedClientGOARCH = []string{"amd64", "arm64"}
)

func getLDFLAGS(pkg string) string {
Expand Down Expand Up @@ -73,9 +74,12 @@ func XBuildAll(pkg string, name string, binDir string) {
var g errgroup.Group
for _, goos := range supportedClientGOOS {
goos := goos
g.Go(func() error {
return XBuild(pkg, name, binDir, goos, "amd64")
})
for _, goarch := range supportedClientGOARCH {
goarch := goarch
g.Go(func() error {
return XBuild(pkg, name, binDir, goos, goarch)
})
}
}

mgx.Must(g.Wait())
Expand Down

0 comments on commit 7451d19

Please sign in to comment.