Skip to content

Commit

Permalink
Added multi arch support to xbuildall
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Gettys <s.gettys@f5.com>
  • Loading branch information
Steven Gettys committed Feb 22, 2023
1 parent eca2867 commit c4fa517
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 c4fa517

Please sign in to comment.