2017-02-13 14:01:54 -05:00
|
|
|
#!/usr/bin/env bash
|
2016-03-09 23:33:21 -05:00
|
|
|
set -e
|
|
|
|
|
|
|
|
# explicit list of os/arch combos that support being a daemon
|
|
|
|
declare -A daemonSupporting
|
|
|
|
daemonSupporting=(
|
|
|
|
[linux/amd64]=1
|
|
|
|
[windows/amd64]=1
|
|
|
|
)
|
|
|
|
platform="windows/amd64"
|
|
|
|
export DEST="$DEST/$platform" # bundles/VERSION/cross/GOOS/GOARCH/docker-VERSION
|
|
|
|
mkdir -p "$DEST"
|
|
|
|
ABS_DEST="$(cd "$DEST" && pwd -P)"
|
|
|
|
export GOOS=${platform%/*}
|
|
|
|
export GOARCH=${platform##*/}
|
|
|
|
if [ -z "${daemonSupporting[$platform]}" ]; then
|
|
|
|
export LDFLAGS_STATIC_DOCKER="" # we just need a simple client for these platforms
|
|
|
|
export BUILDFLAGS=( "${ORIG_BUILDFLAGS[@]/ daemon/}" ) # remove the "daemon" build tag from platforms that aren't supported
|
|
|
|
fi
|
|
|
|
source "${MAKEDIR}/binary"
|