Skip to content

Commit

Permalink
Crossbuilding of functions only supported on AMD64 (elastic#23999)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvch authored Feb 11, 2021
1 parent e3da3be commit 1c10a1c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions x-pack/functionbeat/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"fmt"
"os"
"path/filepath"
"runtime"
"time"

"github.com/magefile/mage/mg"
Expand Down Expand Up @@ -89,6 +90,7 @@ func BuildGoDaemon() error {

// CrossBuild cross-builds the beat for all target platforms.
func CrossBuild() error {

// Building functionbeat manager
err := devtools.CrossBuild()
if err != nil {
Expand All @@ -107,6 +109,11 @@ func CrossBuild() error {
continue
}

if runtime.GOARCH != "amd64" {
fmt.Println("Crossbuilding functions only works on amd64 architecture.")
return nil
}

err := devtools.CrossBuild(devtools.AddPlatforms("linux/amd64"), devtools.InDir("x-pack", "functionbeat", "provider", provider.Name))
if err != nil {
return err
Expand Down

0 comments on commit 1c10a1c

Please sign in to comment.