2017-05-12 11:30:30 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# Build static linux binary for multiple architectures
|
|
|
|
#
|
|
|
|
|
|
|
|
set -eu -o pipefail
|
|
|
|
|
|
|
|
source ./scripts/build/.variables
|
|
|
|
|
2017-05-17 11:59:45 -04:00
|
|
|
CROSS_OSARCH="linux/amd64 linux/arm linux/ppc64le"
|
2017-05-12 11:30:30 -04:00
|
|
|
|
|
|
|
# Not yet supported by gox
|
|
|
|
# linux/s390x
|
|
|
|
|
2017-05-14 13:24:10 -04:00
|
|
|
echo "Building all linux binaries"
|
2017-05-12 11:30:30 -04:00
|
|
|
gox -output build/docker-{{.OS}}-{{.Arch}} \
|
|
|
|
-osarch "${CROSS_OSARCH}" \
|
|
|
|
--ldflags "${LDFLAGS}" \
|
|
|
|
"${SOURCE}"
|