mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Change the windows .tgz to a .zip file
Signed-off-by: Ken Cochrane <kencochrane@gmail.com>
This commit is contained in:
parent
b27f17c9ea
commit
fda99a7e16
4 changed files with 42 additions and 14 deletions
|
@ -74,6 +74,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
xfsprogs \
|
xfsprogs \
|
||||||
libzfs-dev \
|
libzfs-dev \
|
||||||
tar \
|
tar \
|
||||||
|
zip \
|
||||||
--no-install-recommends \
|
--no-install-recommends \
|
||||||
&& pip install awscli==1.10.15 \
|
&& pip install awscli==1.10.15 \
|
||||||
&& ln -snf /usr/bin/clang-3.8 /usr/local/bin/clang \
|
&& ln -snf /usr/bin/clang-3.8 /usr/local/bin/clang \
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -72,10 +72,11 @@ bundles:
|
||||||
cross: build
|
cross: build
|
||||||
$(DOCKER_RUN_DOCKER) hack/make.sh dynbinary binary cross
|
$(DOCKER_RUN_DOCKER) hack/make.sh dynbinary binary cross
|
||||||
|
|
||||||
|
|
||||||
win: build
|
win: build
|
||||||
$(DOCKER_RUN_DOCKER) hack/make.sh win
|
$(DOCKER_RUN_DOCKER) hack/make.sh win
|
||||||
|
|
||||||
|
tgz: build
|
||||||
|
$(DOCKER_RUN_DOCKER) hack/make.sh dynbinary binary cross tgz
|
||||||
|
|
||||||
deb: build
|
deb: build
|
||||||
$(DOCKER_RUN_DOCKER) hack/make.sh dynbinary build-deb
|
$(DOCKER_RUN_DOCKER) hack/make.sh dynbinary build-deb
|
||||||
|
|
|
@ -15,9 +15,17 @@ for d in "$CROSS/"*/*; do
|
||||||
export GOOS="$(basename "$(dirname "$d")")"
|
export GOOS="$(basename "$(dirname "$d")")"
|
||||||
BINARY_NAME="docker-$VERSION"
|
BINARY_NAME="docker-$VERSION"
|
||||||
BINARY_EXTENSION="$(export GOOS && binary_extension)"
|
BINARY_EXTENSION="$(export GOOS && binary_extension)"
|
||||||
|
if [ "$GOOS" = 'windows' ]; then
|
||||||
|
# if windows use a zip, not tgz
|
||||||
|
BUNDLE_EXTENSION=".zip"
|
||||||
|
IS_TAR="false"
|
||||||
|
else
|
||||||
|
BUNDLE_EXTENSION=".tgz"
|
||||||
|
IS_TAR="true"
|
||||||
|
fi
|
||||||
BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION"
|
BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION"
|
||||||
mkdir -p "$DEST/$GOOS/$GOARCH"
|
mkdir -p "$DEST/$GOOS/$GOARCH"
|
||||||
TGZ="$DEST/$GOOS/$GOARCH/$BINARY_NAME.tgz"
|
TGZ="$DEST/$GOOS/$GOARCH/$BINARY_NAME$BUNDLE_EXTENSION"
|
||||||
|
|
||||||
# The staging directory for the files in the tgz
|
# The staging directory for the files in the tgz
|
||||||
BUILD_PATH="$DEST/build"
|
BUILD_PATH="$DEST/build"
|
||||||
|
@ -35,8 +43,21 @@ for d in "$CROSS/"*/*; do
|
||||||
# copy over all the containerd binaries
|
# copy over all the containerd binaries
|
||||||
copy_containerd $TAR_PATH
|
copy_containerd $TAR_PATH
|
||||||
|
|
||||||
echo "Creating tgz from $BUILD_PATH and naming it $TGZ"
|
if [ "$IS_TAR" == "true" ]; then
|
||||||
tar --numeric-owner --owner 0 -C "$BUILD_PATH" -czf "$TGZ" $TAR_BASE_DIRECTORY
|
echo "Creating tgz from $BUILD_PATH and naming it $TGZ"
|
||||||
|
tar --numeric-owner --owner 0 -C "$BUILD_PATH" -czf "$TGZ" $TAR_BASE_DIRECTORY
|
||||||
|
else
|
||||||
|
# ZIP needs to full absolute dir path, not the absolute path
|
||||||
|
ZIP=`pwd`"/$TGZ"
|
||||||
|
# keep track of where we are, for later.
|
||||||
|
pushd .
|
||||||
|
# go into the BUILD_PATH since zip does not have a -C equivalent.
|
||||||
|
cd $BUILD_PATH
|
||||||
|
echo "Creating zip from $BUILD_PATH and naming it $ZIP"
|
||||||
|
zip -q -r $ZIP $TAR_BASE_DIRECTORY
|
||||||
|
# go back to where we started
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
|
||||||
hash_files "$TGZ"
|
hash_files "$TGZ"
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,9 @@ release_build() {
|
||||||
binDir=bundles/$VERSION/cross/$GOOS/$GOARCH
|
binDir=bundles/$VERSION/cross/$GOOS/$GOARCH
|
||||||
tgzDir=bundles/$VERSION/tgz/$GOOS/$GOARCH
|
tgzDir=bundles/$VERSION/tgz/$GOOS/$GOARCH
|
||||||
binary=docker-$VERSION
|
binary=docker-$VERSION
|
||||||
tgz=docker-$VERSION.tgz
|
zipExt=".tgz"
|
||||||
|
binaryExt=""
|
||||||
|
tgz=$binary$zipExt
|
||||||
|
|
||||||
latestBase=
|
latestBase=
|
||||||
if [ -z "$NOLATEST" ]; then
|
if [ -z "$NOLATEST" ]; then
|
||||||
|
@ -204,11 +206,12 @@ release_build() {
|
||||||
s3Os=Linux
|
s3Os=Linux
|
||||||
;;
|
;;
|
||||||
windows)
|
windows)
|
||||||
|
# this is windows use the .zip and .exe extentions for the files.
|
||||||
s3Os=Windows
|
s3Os=Windows
|
||||||
binary+='.exe'
|
zipExt=".zip"
|
||||||
if [ "$latestBase" ]; then
|
binaryExt=".exe"
|
||||||
latestBase+='.exe'
|
tgz=$binary$zipExt
|
||||||
fi
|
binary+=$binaryExt
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo >&2 "error: can't convert $s3Os to an appropriate value for 'uname -s'"
|
echo >&2 "error: can't convert $s3Os to an appropriate value for 'uname -s'"
|
||||||
|
@ -235,11 +238,13 @@ release_build() {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
s3Dir="s3://$BUCKET_PATH/builds/$s3Os/$s3Arch"
|
s3Dir="s3://$BUCKET_PATH/builds/$s3Os/$s3Arch"
|
||||||
latest=
|
# latest=
|
||||||
latestTgz=
|
latestTgz=
|
||||||
if [ "$latestBase" ]; then
|
if [ "$latestBase" ]; then
|
||||||
latest="$s3Dir/$latestBase"
|
# commented out since we aren't uploading binaries right now.
|
||||||
latestTgz="$s3Dir/$latestBase.tgz"
|
# latest="$s3Dir/$latestBase$binaryExt"
|
||||||
|
# we don't include the $binaryExt because we don't want docker.exe.zip
|
||||||
|
latestTgz="$s3Dir/$latestBase$zipExt"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$tgzDir/$tgz" ]; then
|
if [ ! -f "$tgzDir/$tgz" ]; then
|
||||||
|
@ -308,6 +313,6 @@ echo "We have just pushed $VERSION to $(s3_url). You can download it with the fo
|
||||||
echo
|
echo
|
||||||
echo "Darwin/OSX 64bit client tgz: $(s3_url)/builds/Darwin/x86_64/docker-$VERSION.tgz"
|
echo "Darwin/OSX 64bit client tgz: $(s3_url)/builds/Darwin/x86_64/docker-$VERSION.tgz"
|
||||||
echo "Linux 64bit tgz: $(s3_url)/builds/Linux/x86_64/docker-$VERSION.tgz"
|
echo "Linux 64bit tgz: $(s3_url)/builds/Linux/x86_64/docker-$VERSION.tgz"
|
||||||
echo "Windows 64bit client tgz: $(s3_url)/builds/Windows/x86_64/docker-$VERSION.tgz"
|
echo "Windows 64bit client tgz: $(s3_url)/builds/Windows/x86_64/docker-$VERSION.zip"
|
||||||
echo "Windows 32bit client tgz: $(s3_url)/builds/Windows/i386/docker-$VERSION.tgz"
|
echo "Windows 32bit client tgz: $(s3_url)/builds/Windows/i386/docker-$VERSION.zip"
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in a new issue