Merge pull request #129 from dnephin/remove-gox

Remove gox, add support for s390x
This commit is contained in:
Kenfe-Mickaël Laventure 2017-05-30 14:05:58 -07:00 committed by GitHub
commit 6c59636498
5 changed files with 11 additions and 31 deletions

View File

@ -11,10 +11,6 @@ RUN apt-get update -qq && apt-get install -y -q \
parallel \ parallel \
; ;
RUN go get github.com/mitchellh/gox && \
cp /go/bin/gox /usr/bin && \
rm -rf /go/src/* /go/pkg/* /go/bin/*
COPY dockerfiles/osx-cross.sh /tmp/ COPY dockerfiles/osx-cross.sh /tmp/
RUN /tmp/osx-cross.sh RUN /tmp/osx-cross.sh
ENV PATH /osxcross/target/bin:$PATH ENV PATH /osxcross/target/bin:$PATH

View File

@ -7,10 +7,6 @@ RUN go get github.com/LK4D4/vndr && \
cp /go/bin/vndr /usr/bin && \ cp /go/bin/vndr /usr/bin && \
rm -rf /go/src/* /go/pkg/* /go/bin/* rm -rf /go/src/* /go/pkg/* /go/bin/*
RUN go get github.com/mitchellh/gox && \
cp /go/bin/gox /usr/bin && \
rm -rf /go/src/* /go/pkg/* /go/bin/*
RUN go get github.com/jteeuwen/go-bindata/go-bindata && \ RUN go get github.com/jteeuwen/go-bindata/go-bindata && \
cp /go/bin/go-bindata /usr/bin && \ cp /go/bin/go-bindata /usr/bin && \
rm -rf /go/src/* /go/pkg/* /go/bin/* rm -rf /go/src/* /go/pkg/* /go/bin/*

View File

@ -1,5 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu set -eu
VERSION=${VERSION:-"unknown-version"} VERSION=${VERSION:-"unknown-version"}
@ -14,5 +13,7 @@ export LDFLAGS="\
${LDFLAGS:-} \ ${LDFLAGS:-} \
" "
export TARGET="build/docker-$(go env GOHOSTOS)-$(go env GOHOSTARCH)" GOOS="${GOOS:-$(go env GOHOSTOS)}"
GOARCH="${GOARCH:-$(go env GOHOSTARCH)}"
export TARGET="build/docker-$GOOS-$GOARCH"
export SOURCE="github.com/docker/cli/cmd/docker" export SOURCE="github.com/docker/cli/cmd/docker"

View File

@ -1,12 +1,18 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#
# Build a binary for all supported platforms
#
set -eu -o pipefail set -eu -o pipefail
BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Building all binaries" echo "Building binaries for all platforms"
SHELL=/bin/bash parallel ::: \ SHELL=/bin/bash parallel ::: \
"$BUILDDIR/linux-cross" \
"$BUILDDIR/windows" \ "$BUILDDIR/windows" \
"$BUILDDIR/osx" \ "$BUILDDIR/osx" \
"GOOS=linux GOARCH=amd64 $BUILDDIR/binary" \
"GOOS=linux GOARCH=arm $BUILDDIR/binary" \
"GOOS=linux GOARCH=ppc64le $BUILDDIR/binary" \
"GOOS=linux GOARCH=s390x $BUILDDIR/binary" \
; ;

View File

@ -1,19 +0,0 @@
#!/usr/bin/env bash
#
# Build static linux binary for multiple architectures
#
set -eu -o pipefail
source ./scripts/build/.variables
CROSS_OSARCH="linux/amd64 linux/arm linux/ppc64le"
# Not yet supported by gox
# linux/s390x
echo "Building all linux binaries"
gox -output build/docker-{{.OS}}-{{.Arch}} \
-osarch "${CROSS_OSARCH}" \
--ldflags "${LDFLAGS}" \
"${SOURCE}"