diff --git a/hack/dockerbuilder/dockerbuilder b/hack/dockerbuilder/dockerbuilder index e5331b603e..50038b1959 100644 --- a/hack/dockerbuilder/dockerbuilder +++ b/hack/dockerbuilder/dockerbuilder @@ -11,16 +11,17 @@ fi export REVISION=$1 AWS_ID=$2 AWS_KEY=$3 -mkdir -p /go/src/$PACKAGE -git clone "https://$PACKAGE" /go/src/$PACKAGE -cd /go/src/$PACKAGE +mkdir -p go/src/$PACKAGE +git clone "https://$PACKAGE" go/src/$PACKAGE +cd go/src/$PACKAGE git checkout $REVISION # FIXME: checkout to specific revision -BUILDDIR=/tmp/docker-$REVISION +BUILDDIR=docker-$REVISION mkdir -p $BUILDDIR (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