build: exclude freebsd/arm

This commit is contained in:
Jack Pearkes 2018-10-19 11:32:35 -07:00
parent 451f95db55
commit a20804df28
1 changed files with 17 additions and 17 deletions

View File

@ -316,13 +316,13 @@ function build_consul {
fi fi
XC_OS=${XC_OS:-"solaris darwin freebsd linux windows"} XC_OS=${XC_OS:-"solaris darwin freebsd linux windows"}
XC_ARCH=${XC_ARCH:-"386 amd64 arm arm64"} XC_ARCH=${XC_ARCH:-"386 amd64 arm arm64"}
if test -n "${extra_dir_name}" if test -n "${extra_dir_name}"
then then
extra_dir="${extra_dir_name}/" extra_dir="${extra_dir_name}/"
fi fi
local container_id=$(docker create -it -e CGO_ENABLED=0 ${image_name} gox -os="${XC_OS}" -arch="${XC_ARCH}" -osarch="!darwin/arm !darwin/arm64" -ldflags "${GOLDFLAGS}" -output "pkg/bin/${extra_dir}{{.OS}}_{{.Arch}}/consul" -tags="${GOTAGS}") local container_id=$(docker create -it -e CGO_ENABLED=0 ${image_name} gox -os="${XC_OS}" -arch="${XC_ARCH}" -osarch="!darwin/arm !freebsd/arm !darwin/arm64" -ldflags "${GOLDFLAGS}" -output "pkg/bin/${extra_dir}{{.OS}}_{{.Arch}}/consul" -tags="${GOTAGS}")
ret=$? ret=$?
if test $ret -eq 0 if test $ret -eq 0
@ -393,39 +393,39 @@ function build_consul_local {
then then
XC_OS=$(go env GOOS) XC_OS=$(go env GOOS)
fi fi
if test -z "${XC_ARCH}" if test -z "${XC_ARCH}"
then then
XC_ARCH=$(go env GOARCH) XC_ARCH=$(go env GOARCH)
fi fi
fi fi
XC_OS=${XC_OS:-"solaris darwin freebsd linux windows"} XC_OS=${XC_OS:-"solaris darwin freebsd linux windows"}
XC_ARCH=${XC_ARCH:-"386 amd64 arm arm64"} XC_ARCH=${XC_ARCH:-"386 amd64 arm arm64"}
if test -z "${build_os}" if test -z "${build_os}"
then then
build_os="${XC_OS}" build_os="${XC_OS}"
fi fi
if test -z "${build_arch}" if test -z "${build_arch}"
then then
build_arch="${XC_ARCH}" build_arch="${XC_ARCH}"
fi fi
local use_gox=1 local use_gox=1
is_set "${NOGOX}" && use_gox=0 is_set "${NOGOX}" && use_gox=0
which gox > /dev/null || use_gox=0 which gox > /dev/null || use_gox=0
status_stage "==> Building Consul - OSes: ${build_os}, Architectures: ${build_arch}" status_stage "==> Building Consul - OSes: ${build_os}, Architectures: ${build_arch}"
mkdir pkg.bin.new 2> /dev/null mkdir pkg.bin.new 2> /dev/null
if is_set "${use_gox}" if is_set "${use_gox}"
then then
status "Using gox for concurrent compilation" status "Using gox for concurrent compilation"
CGO_ENABLED=0 gox \ CGO_ENABLED=0 gox \
-os="${build_os}" \ -os="${build_os}" \
-arch="${build_arch}" \ -arch="${build_arch}" \
-osarch="!darwin/arm !darwin/arm64" \ -osarch="!darwin/arm !darwin/arm64 !freebsd/arm" \
-ldflags="${GOLDFLAGS}" \ -ldflags="${GOLDFLAGS}" \
-output "pkg.bin.new/${extra_dir}{{.OS}}_{{.Arch}}/consul" \ -output "pkg.bin.new/${extra_dir}{{.OS}}_{{.Arch}}/consul" \
-tags="${GOTAGS}" \ -tags="${GOTAGS}" \
@ -445,19 +445,19 @@ function build_consul_local {
do do
outdir="pkg.bin.new/${extra_dir}${os}_${arch}" outdir="pkg.bin.new/${extra_dir}${os}_${arch}"
osarch="${os}/${arch}" osarch="${os}/${arch}"
if test "${osarch}" == "darwin/arm" -o "${osarch}" == "darwin/arm64" -o "${osarch}" == "freebsd/arm64" -o "${osarch}" == "windows/arm" -o "${osarch}" == "windows/arm64" if test "${osarch}" == "darwin/arm" -o "${osarch}" == "darwin/arm64" -o "${osarch}" == "freebsd/arm64" -o "${osarch}" == "windows/arm" -o "${osarch}" == "windows/arm64" -o "${osarch}" == "freebsd/arm"
then then
continue continue
fi fi
if test "${os}" == "solaris" -a "${arch}" != "amd64" if test "${os}" == "solaris" -a "${arch}" != "amd64"
then then
continue continue
fi fi
echo "---> ${osarch}" echo "---> ${osarch}"
mkdir -p "${outdir}" mkdir -p "${outdir}"
GOBIN_EXTRA="" GOBIN_EXTRA=""
if test "${os}" != "$(go env GOHOSTOS)" -o "${arch}" != "$(go env GOHOSTARCH)" if test "${os}" != "$(go env GOHOSTOS)" -o "${arch}" != "$(go env GOHOSTARCH)"