Skip to content

lost ability to build server image on mac

Created by: uwedeportivo

Steps to reproduce:

on mac

  1. cd cmd/server
  2. ./pre-build.sh
  3. IMAGE=sourcegraph/server:uwe-dev VERSION=3.17.0 ./build.sh

Expected behavior:

build finishes and creates server image

Actual behavior:

build stops with this error:

--- monitoring generation
+ pushd monitoring
~/work/src/github.com/sourcegraph/sourcegraph/monitoring ~/work/src/github.com/sourcegraph/sourcegraph
+ go generate
Regenerating monitoring...
generator.go:3: running "/tmp/monitoring-generator": fork/exec /tmp/monitoring-generator: exec format error

problem is the monitoring-generator is created on demand so with linux arch and then used on mac to generate

https://github.com/sourcegraph/sourcegraph/blob/master/monitoring/generator.go#L1