Add windows/(386,amd64) to cross platforms list

Edited make scripts to append .exe to windows binary

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Upstream-commit: b7703a992e14255a5972bf157d0c2cfc0da3d53f
Component: engine
This commit is contained in:
Ahmet Alp Balkan
2014-10-27 22:05:57 -07:00
parent cd6fd83f37
commit 35f4af009d
3 changed files with 11 additions and 5 deletions

View File

@ -4,6 +4,7 @@
.vagrant*
bin
docker/docker
*.exe
.*.swp
a.out
*.orig

View File

@ -68,7 +68,8 @@ RUN cd /usr/local/go/src && ./make.bash --no-clean 2>&1
ENV DOCKER_CROSSPLATFORMS \
linux/386 linux/arm \
darwin/amd64 darwin/386 \
freebsd/amd64 freebsd/386 freebsd/arm
freebsd/amd64 freebsd/386 freebsd/arm \
windows/amd64 windows/386
# (set an explicit GOARM of 5 for maximum compatibility)
ENV GOARM 5
RUN cd /usr/local/go/src && bash -xc 'for platform in $DOCKER_CROSSPLATFORMS; do GOOS=${platform%/*} GOARCH=${platform##*/} ./make.bash --no-clean 2>&1; done'

View File

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