mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #9688 from dqminh/fix-make-tgz
make.sh tgz should handle windows binary
This commit is contained in:
commit
1531bf48aa
1 changed files with 8 additions and 2 deletions
|
@ -13,13 +13,19 @@ fi
|
|||
for d in "$CROSS/"*/*; do
|
||||
GOARCH="$(basename "$d")"
|
||||
GOOS="$(basename "$(dirname "$d")")"
|
||||
BINARY_NAME="docker-$VERSION"
|
||||
BINARY_EXTENSION=
|
||||
if [ "$GOOS" = 'windows' ]; then
|
||||
BINARY_EXTENSION='.exe'
|
||||
fi
|
||||
BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION"
|
||||
mkdir -p "$DEST/$GOOS/$GOARCH"
|
||||
TGZ="$DEST/$GOOS/$GOARCH/docker-$VERSION.tgz"
|
||||
TGZ="$DEST/$GOOS/$GOARCH/$BINARY_NAME.tgz"
|
||||
|
||||
mkdir -p "$DEST/build"
|
||||
|
||||
mkdir -p "$DEST/build/usr/local/bin"
|
||||
cp -L "$d/docker-$VERSION" "$DEST/build/usr/local/bin/docker"
|
||||
cp -L "$d/$BINARY_FULLNAME" "$DEST/build/usr/local/bin/docker$BINARY_EXTENSION"
|
||||
|
||||
tar --numeric-owner --owner 0 -C "$DEST/build" -czf "$TGZ" usr
|
||||
|
||||
|
|
Loading…
Reference in a new issue