#!/usr/bin/env bash
#
# Build static linux binary for multiple architectures
set -eu -o pipefail
source ./scripts/build/.variables
CROSS_OSARCH="linux/amd64 linux/arm"
# Compile is broken
# linux/ppc64le
# Not yet supported by gox
# linux/s390x
echo "Building all linux binaries"
gox -output build/docker-{{.OS}}-{{.Arch}} \
-osarch "${CROSS_OSARCH}" \
--ldflags "${LDFLAGS}" \
"${SOURCE}"