1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

dockerbuilder: build in current directory instead /go and /tmp

This commit is contained in:
Solomon Hykes 2013-04-23 10:53:02 -07:00
parent 0512cf9c83
commit 7577f48dc4

View file

@ -11,16 +11,17 @@ fi
export REVISION=$1 AWS_ID=$2 AWS_KEY=$3 export REVISION=$1 AWS_ID=$2 AWS_KEY=$3
mkdir -p /go/src/$PACKAGE mkdir -p go/src/$PACKAGE
git clone "https://$PACKAGE" /go/src/$PACKAGE git clone "https://$PACKAGE" go/src/$PACKAGE
cd /go/src/$PACKAGE cd go/src/$PACKAGE
git checkout $REVISION git checkout $REVISION
# FIXME: checkout to specific revision # FIXME: checkout to specific revision
BUILDDIR=/tmp/docker-$REVISION BUILDDIR=docker-$REVISION
mkdir -p $BUILDDIR mkdir -p $BUILDDIR
(cd docker && go get && go build -o $BUILDDIR/docker) (cd docker && go get && go build -o $BUILDDIR/docker)
tar -f /tmp/docker.tgz -C $(dirname $BUILDDIR) -zc $(basename $BUILDDIR) BUILD_ARCHIVE=docker-$REVISION.tgz
tar -f BUILD_ARCHIVE -C $(dirname $BUILDDIR) -zc $(basename $BUILDDIR)
s3cmd -P put /tmp/docker.tgz s3://get.docker.io/builds/$(uname -s)/$(uname -m)/docker-$REVISION.tgz s3cmd -P put /tmp/docker.tgz s3://get.docker.io/builds/$(uname -s)/$(uname -m)/docker-$REVISION.tgz