1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

remove cli concerns from hack/make

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2017-06-20 16:55:40 -04:00
parent 4e5293c253
commit ea2e4d73c4
5 changed files with 10 additions and 34 deletions

View file

@ -112,7 +112,6 @@ if [ ! "$GOPATH" ]; then
exit 1
fi
DOCKER_BUILDTAGS+=" daemon"
if ${PKG_CONFIG} 'libsystemd >= 209' 2> /dev/null ; then
DOCKER_BUILDTAGS+=" journald"
elif ${PKG_CONFIG} 'libsystemd-journal' 2> /dev/null ; then
@ -139,7 +138,6 @@ fi
# Use these flags when compiling the tests and final binary
IAMSTATIC='true'
source "$SCRIPTDIR/make/.go-autogen"
if [ -z "$DOCKER_DEBUG" ]; then
LDFLAGS='-w'
fi

View file

@ -1,6 +1,8 @@
#!/usr/bin/env bash
set -e
GO_PACKAGE='github.com/docker/docker/cmd/dockerd'
BINARY_SHORT_NAME='dockerd'
BINARY_NAME="$BINARY_SHORT_NAME-$VERSION"
BINARY_EXTENSION="$(binary_extension)"
BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION"

View file

@ -1,13 +1,9 @@
#!/usr/bin/env bash
set -e
[ -z "$KEEPDEST" ] && \
rm -rf "$DEST"
[ -z "$KEEPDEST" ] && rm -rf "$DEST"
(
source "${MAKEDIR}/.binary-setup"
export BINARY_SHORT_NAME="$DOCKER_DAEMON_BINARY_NAME"
export GO_PACKAGE='github.com/docker/docker/cmd/dockerd'
source "${MAKEDIR}/.binary"
copy_binaries "$DEST" 'hash'
)

View file

@ -1,24 +1,19 @@
#!/usr/bin/env bash
set -e
# explicit list of os/arch combos that support being a daemon
declare -A daemonSupporting
daemonSupporting=(
[linux/amd64]=1
[windows/amd64]=1
)
# if we have our linux/amd64 version compiled, let's symlink it in
if [ -x "$DEST/../binary-daemon/dockerd-$VERSION" ]; then
arch=$(go env GOHOSTARCH)
mkdir -p "$DEST/linux/${arch}"
(
cd "$DEST/linux/${arch}"
ln -s ../../../binary-daemon/* ./
ln -sf ../../../binary-daemon/* ./
)
echo "Created symlinks:" "$DEST/linux/${arch}/"*
fi
DOCKER_CROSSPLATFORMS=${DOCKER_CROSSPLATFORMS:-"linux/amd64 windows/amd64"}
for platform in $DOCKER_CROSSPLATFORMS; do
(
export KEEPDEST=1
@ -26,22 +21,9 @@ for platform in $DOCKER_CROSSPLATFORMS; do
export GOOS=${platform%/*}
export GOARCH=${platform##*/}
if [ "$GOOS" != "solaris" ]; then
# TODO. Solaris cannot be cross build because of CGO calls.
echo "Cross building: $DEST"
# go install docker/docker/pkg packages to ensure that
# they build cross platform.
go install github.com/docker/docker/pkg/...
if [ -n "${daemonSupporting[$platform]}" ]; then
# Since tgz relies on the paths created by mkdir
# and we removed the clients, we don't want to mkdir
# for all the platforms, only the ones supported by the daemon.
mkdir -p "$DEST"
ABS_DEST="$(cd "$DEST" && pwd -P)"
source "${MAKEDIR}/binary-daemon"
fi
fi
echo "Cross building: $DEST"
mkdir -p "$DEST"
ABS_DEST="$(cd "$DEST" && pwd -P)"
source "${MAKEDIR}/binary-daemon"
)
done

View file

@ -2,8 +2,6 @@
set -e
(
export BINARY_SHORT_NAME='dockerd'
export GO_PACKAGE='github.com/docker/docker/cmd/dockerd'
export IAMSTATIC='false'
export LDFLAGS_STATIC_DOCKER=''
export BUILDFLAGS=( "${BUILDFLAGS[@]/netgo /}" ) # disable netgo, since we don't need it for a dynamic binary