diff --git a/scripts/build.sh b/scripts/build.sh index 3cbe3f50..0eede673 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -29,7 +29,6 @@ if [ "$(go env GOOS)" = "windows" ]; then fi ldflags=" - -extldflags \"-static\" -X ${repo_path}/version.Version=${version} -X ${repo_path}/version.Revision=${revision} -X ${repo_path}/version.Branch=${branch} @@ -37,6 +36,10 @@ ldflags=" -X ${repo_path}/version.BuildDate=${build_date} -X ${repo_path}/version.GoVersion=${go_version}" +if [ "$(go env GOOS)" != "darwin" ]; then + ldflags="${ldflags} -extldflags \"-static\"" +fi + export GO15VENDOREXPERIMENT="1" echo " > alertmanager"