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

22 lines
360 B
Text
Raw Normal View History

#!/bin/bash
set -e
DEST=$1
BINARY_NAME="docker-$VERSION"
if [ "$(go env GOOS)" = 'windows' ]; then
BINARY_NAME+='.exe'
fi
go build \
-o "$DEST/$BINARY_NAME" \
"${BUILDFLAGS[@]}" \
-ldflags "
$LDFLAGS
$LDFLAGS_STATIC_DOCKER
" \
./docker
echo "Created binary: $DEST/$BINARY_NAME"
ln -sf "$BINARY_NAME" "$DEST/docker"
hash_files "$DEST/$BINARY_NAME"