mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #2815 from tianon/hack-make-tgz
Add tgz bundlescript
This commit is contained in:
commit
8bd6127ab3
3 changed files with 42 additions and 0 deletions
|
@ -37,6 +37,7 @@ DEFAULT_BUNDLES=(
|
||||||
test
|
test
|
||||||
dynbinary
|
dynbinary
|
||||||
dyntest
|
dyntest
|
||||||
|
tgz
|
||||||
ubuntu
|
ubuntu
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
23
hack/make/tgz
Normal file
23
hack/make/tgz
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
DEST="$1"
|
||||||
|
BINARY="$DEST/../binary/docker-$VERSION"
|
||||||
|
TGZ="$DEST/docker-$VERSION.tgz"
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ ! -x "$BINARY" ]; then
|
||||||
|
echo >&2 'error: binary must be run before tgz'
|
||||||
|
false
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$DEST/build"
|
||||||
|
|
||||||
|
mkdir -p "$DEST/build/usr/local/bin"
|
||||||
|
cp -L "$BINARY" "$DEST/build/usr/local/bin/docker"
|
||||||
|
|
||||||
|
tar --numeric-owner --owner 0 -C "$DEST/build" -czf "$TGZ" usr
|
||||||
|
|
||||||
|
rm -rf "$DEST/build"
|
||||||
|
|
||||||
|
echo "Created tgz: $TGZ"
|
|
@ -47,6 +47,7 @@ cd /go/src/github.com/dotcloud/docker
|
||||||
|
|
||||||
RELEASE_BUNDLES=(
|
RELEASE_BUNDLES=(
|
||||||
binary
|
binary
|
||||||
|
tgz
|
||||||
ubuntu
|
ubuntu
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -188,6 +189,22 @@ EOF
|
||||||
echo "APT repository uploaded. Instructions available at $(s3_url)/ubuntu"
|
echo "APT repository uploaded. Instructions available at $(s3_url)/ubuntu"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Upload a tgz to S3
|
||||||
|
release_tgz() {
|
||||||
|
[ -e bundles/$VERSION/tgz/docker-$VERSION.tgz ] || {
|
||||||
|
echo >&2 './hack/make.sh must be run before release_binary'
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
S3DIR=s3://$BUCKET/builds/Linux/x86_64
|
||||||
|
s3cmd --acl-public put bundles/$VERSION/tgz/docker-$VERSION.tgz $S3DIR/docker-$VERSION.tgz
|
||||||
|
|
||||||
|
if [ -z "$NOLATEST" ]; then
|
||||||
|
echo "Copying docker-$VERSION.tgz to docker-latest.tgz"
|
||||||
|
s3cmd --acl-public cp $S3DIR/docker-$VERSION.tgz $S3DIR/docker-latest.tgz
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Upload a static binary to S3
|
# Upload a static binary to S3
|
||||||
release_binary() {
|
release_binary() {
|
||||||
[ -e bundles/$VERSION/binary/docker-$VERSION ] || {
|
[ -e bundles/$VERSION/binary/docker-$VERSION ] || {
|
||||||
|
@ -230,6 +247,7 @@ release_test() {
|
||||||
main() {
|
main() {
|
||||||
setup_s3
|
setup_s3
|
||||||
release_binary
|
release_binary
|
||||||
|
release_tgz
|
||||||
release_ubuntu
|
release_ubuntu
|
||||||
release_index
|
release_index
|
||||||
release_test
|
release_test
|
||||||
|
|
Loading…
Add table
Reference in a new issue